rpc/dataconn: fix I/O timeout on variable receive rate

refs #162
This commit is contained in:
Christian Schwarz
2019-03-31 14:20:06 +02:00
parent 082335df5d
commit d6304f4f1d
4 changed files with 162 additions and 4 deletions
+4
View File
@@ -222,6 +222,10 @@ func (c *Conn) writeFrame(payload []byte, frameType uint32) error {
return nil
}
func (c *Conn) ResetWriteTimeout() error {
return c.nc.RenewWriteDeadline()
}
func (c *Conn) Shutdown(deadline time.Time) error {
// TCP connection teardown is a bit wonky if we are in a situation
// where there is still data in flight (DIF) to our side: