Fix full sync request condition

This commit is contained in:
mcrakhman 2023-04-20 11:46:19 +02:00 committed by Mikhail Iudin
parent 077cdd6278
commit 00902c5740
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -134,5 +134,5 @@ func (s *objectSync) sendError(ctx context.Context, root *treechangeproto.RawTre
} }
func (s *objectSync) isEmptyFullSyncRequest(msg *treechangeproto.TreeSyncMessage) bool { 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
} }