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