From 00902c5740af9e63c48f24313b02eb7f403cf12d 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 0962e132..c70db5fa 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 }