diff --git a/gbn/gbn_conn.go b/gbn/gbn_conn.go index 98b9ff5e..f561e54d 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -19,7 +19,7 @@ var ( const ( DefaultN = 20 - defaultHandshakeTimeout = 100 * time.Millisecond + defaultHandshakeTimeout = 1000 * time.Millisecond defaultResendTimeout = 2000 * time.Millisecond finSendTimeout = 1000 * time.Millisecond defaultResendMultiplier = 5 diff --git a/gbn/queue.go b/gbn/queue.go index af5a2229..3f1e04a0 100644 --- a/gbn/queue.go +++ b/gbn/queue.go @@ -39,7 +39,10 @@ type queue struct { // topMtx is used to guard sequenceTop. topMtx sync.RWMutex - lastResend time.Time + lastResend time.Time + + // handshakeTimeout defines minimum time we need to wait before + // resending the queue again, since the last time we resent it. handshakeTimeout time.Duration }