forked from quic-go/quic-go
move deadlineTimer declaration out of the Read loop
This commit is contained in:
@@ -104,6 +104,7 @@ func (s *receiveStream) readImpl(p []byte) (bool /*stream completed */, int, err
|
||||
}
|
||||
|
||||
bytesRead := 0
|
||||
var deadlineTimer *utils.Timer
|
||||
for bytesRead < len(p) {
|
||||
if s.currentFrame == nil || s.readPosInFrame >= len(s.currentFrame) {
|
||||
s.dequeueNextFrame()
|
||||
@@ -112,7 +113,6 @@ func (s *receiveStream) readImpl(p []byte) (bool /*stream completed */, int, err
|
||||
return false, bytesRead, s.closeForShutdownErr
|
||||
}
|
||||
|
||||
var deadlineTimer *utils.Timer
|
||||
for {
|
||||
// Stop waiting on errors
|
||||
if s.closedForShutdown {
|
||||
|
||||
Reference in New Issue
Block a user