aboutsummaryrefslogtreecommitdiff
path: root/fasthttputil
diff options
context:
space:
mode:
authorGravatar rogercarter1 <53250825+rogercarter1@users.noreply.github.com> 2019-10-16 16:18:52 +0800
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-10-16 16:18:52 +0800
commit044d35e5eff18d5db8f3170f407e1bd79c064baf (patch)
tree50866fffe8db2f0b13d6c45415c0c77d7398bf2c /fasthttputil
parentAllow client to disable path normalization (#672) (diff)
downloadfasthttp-044d35e5eff18d5db8f3170f407e1bd79c064baf.tar.gz
fasthttp-044d35e5eff18d5db8f3170f407e1bd79c064baf.tar.bz2
fasthttp-044d35e5eff18d5db8f3170f407e1bd79c064baf.zip
fix 664 (#674)
Diffstat (limited to 'fasthttputil')
-rw-r--r--fasthttputil/pipeconns.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/fasthttputil/pipeconns.go b/fasthttputil/pipeconns.go
index c6ca39d..8c4fab7 100644
--- a/fasthttputil/pipeconns.go
+++ b/fasthttputil/pipeconns.go
@@ -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 {