Merge pull request #22804 from ncdc/bump-spdystream

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-03-11 02:18:25 -08:00
commit 5e50302a55
2 changed files with 6 additions and 5 deletions

2
Godeps/Godeps.json generated
View File

@ -399,7 +399,7 @@
},
{
"ImportPath": "github.com/docker/spdystream",
"Rev": "106e140db2cb50923efe088bf2906b2ee5a45fec"
"Rev": "449fdfce4d962303d702fec724ef0ad181c92528"
},
{
"ImportPath": "github.com/elazarl/go-bindata-assetfs",

View File

@ -170,6 +170,11 @@ func (s *Stream) Reset() 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()
if s.finished {
s.finishLock.Unlock()
@ -178,8 +183,6 @@ func (s *Stream) resetStream() error {
s.finished = true
s.finishLock.Unlock()
s.closeRemoteChannels()
resetFrame := &spdy.RstStreamFrame{
StreamId: s.streamId,
Status: spdy.Cancel,
@ -320,7 +323,5 @@ func (s *Stream) closeRemoteChannels() {
case <-s.closeChan:
default:
close(s.closeChan)
s.dataLock.Lock()
defer s.dataLock.Unlock()
}
}