From 4e224d64c69b4b53fda1d9ecfd6a6f5120fe7836 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sat, 24 Dec 2016 22:04:09 +0100 Subject: [PATCH] Fix #337 --- transport/internet/kcp/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/internet/kcp/connection.go b/transport/internet/kcp/connection.go index 36f851d47..c86860a2e 100644 --- a/transport/internet/kcp/connection.go +++ b/transport/internet/kcp/connection.go @@ -315,7 +315,7 @@ func (v *Connection) Write(b []byte) (int, error) { } duration := time.Duration(time.Minute) - if !v.rd.IsZero() { + if !v.wd.IsZero() { duration = v.wd.Sub(time.Now()) if duration < 0 { return totalWritten, ErrIOTimeout