return an error when calling OpenStream after the session was closed

fixes #615
This commit is contained in:
Marten Seemann
2017-05-14 13:56:38 +08:00
parent 222ffa2f48
commit ba16a80864
2 changed files with 10 additions and 0 deletions

View File

@@ -166,6 +166,9 @@ func (m *streamsMap) OpenStream() (*stream, error) {
m.mutex.Lock()
defer m.mutex.Unlock()
if m.closeErr != nil {
return nil, m.closeErr
}
return m.openStreamImpl()
}