1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

increase sendSync timeout

This commit is contained in:
Sergey Cherepanov 2023-05-15 20:30:32 +02:00 committed by Mikhail Iudin
parent b8cb74d2ff
commit 5e1ac84d37
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0

View file

@ -54,7 +54,7 @@ func newMessagePool(peerManager peermanager.PeerManager, messageHandler MessageH
func (s *messagePool) SendSync(ctx context.Context, peerId string, msg *spacesyncproto.ObjectSyncMessage) (reply *spacesyncproto.ObjectSyncMessage, err error) {
s.updateLastUsage()
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, time.Second*10)
ctx, cancel = context.WithTimeout(ctx, time.Minute)
defer cancel()
newCounter := s.counter.Add(1)
msg.RequestId = genReplyKey(peerId, msg.ObjectId, newCounter)