Skip to content

Commit

Permalink
fix 664 (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercarter1 authored and erikdubbelboer committed Oct 16, 2019
1 parent ffcdb75 commit 044d35e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fasthttputil/pipeconns.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func (c *pipeConn) readNextByteBuffer(mayBlock bool) error {
select {
case c.b = <-c.rCh:
case <-readDeadlineCh:
c.readDeadlineChLock.Lock()
c.readDeadlineCh = closedDeadlineCh
c.readDeadlineChLock.Unlock()
// rCh may contain data when deadline is reached.
// Read the data before returning ErrTimeout.
select {
Expand Down

0 comments on commit 044d35e

Please sign in to comment.