From 2894b8ef665ec2d86aac722b92028681f3948c7b Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 20 Apr 2023 11:46:19 +0200 Subject: [PATCH] Fix full sync request condition --- commonspace/objectsync/objectsync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commonspace/objectsync/objectsync.go b/commonspace/objectsync/objectsync.go index 02e6019c..e22db4bd 100644 --- a/commonspace/objectsync/objectsync.go +++ b/commonspace/objectsync/objectsync.go @@ -134,5 +134,5 @@ func (s *objectSync) sendError(ctx context.Context, root *treechangeproto.RawTre } func (s *objectSync) isEmptyFullSyncRequest(msg *treechangeproto.TreeSyncMessage) bool { - return len(msg.GetContent().GetFullSyncRequest().GetHeads()) == 0 + return msg.GetContent().GetFullSyncRequest() != nil && len(msg.GetContent().GetFullSyncRequest().GetHeads()) == 0 }