Commit 36243b80 authored by Andy Goldstein's avatar Andy Goldstein

bump(github.com/docker/spdystream): 449fdfce4d962303d702fec724ef0ad181c92528

parent 1460f247
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
}, },
{ {
"ImportPath": "github.com/docker/spdystream", "ImportPath": "github.com/docker/spdystream",
"Rev": "106e140db2cb50923efe088bf2906b2ee5a45fec" "Rev": "449fdfce4d962303d702fec724ef0ad181c92528"
}, },
{ {
"ImportPath": "github.com/elazarl/go-bindata-assetfs", "ImportPath": "github.com/elazarl/go-bindata-assetfs",
......
...@@ -170,6 +170,11 @@ func (s *Stream) Reset() error { ...@@ -170,6 +170,11 @@ func (s *Stream) Reset() error {
} }
func (s *Stream) resetStream() error { func (s *Stream) resetStream() error {
// Always call closeRemoteChannels, even if s.finished is already true.
// This makes it so that stream.Close() followed by stream.Reset() allows
// stream.Read() to unblock.
s.closeRemoteChannels()
s.finishLock.Lock() s.finishLock.Lock()
if s.finished { if s.finished {
s.finishLock.Unlock() s.finishLock.Unlock()
...@@ -178,8 +183,6 @@ func (s *Stream) resetStream() error { ...@@ -178,8 +183,6 @@ func (s *Stream) resetStream() error {
s.finished = true s.finished = true
s.finishLock.Unlock() s.finishLock.Unlock()
s.closeRemoteChannels()
resetFrame := &spdy.RstStreamFrame{ resetFrame := &spdy.RstStreamFrame{
StreamId: s.streamId, StreamId: s.streamId,
Status: spdy.Cancel, Status: spdy.Cancel,
...@@ -320,7 +323,5 @@ func (s *Stream) closeRemoteChannels() { ...@@ -320,7 +323,5 @@ func (s *Stream) closeRemoteChannels() {
case <-s.closeChan: case <-s.closeChan:
default: default:
close(s.closeChan) close(s.closeChan)
s.dataLock.Lock()
defer s.dataLock.Unlock()
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment