stop the deadline timer in Stream.Read and Write

This commit is contained in:
Marten Seemann 2020-05-03 11:22:58 +07:00
parent c0b6d4e141
commit 93cee1e07b
2 changed files with 2 additions and 0 deletions

View file

@ -137,6 +137,7 @@ func (s *sendStream) Write(p []byte) (int, error) {
}
if deadlineTimer == nil {
deadlineTimer = utils.NewTimer()
defer deadlineTimer.Stop()
}
deadlineTimer.Reset(deadline)
}