only delete streams once we are done reading AND writing

fixes #98
This commit is contained in:
Lucas Clemente
2016-05-15 15:03:02 +02:00
parent d78b2f4d57
commit d4de18c472
3 changed files with 48 additions and 2 deletions

View File

@@ -574,7 +574,7 @@ func (s *Session) garbageCollectStreams() {
if v == nil {
continue
}
if v.finishedReading() {
if v.finished() {
s.streams[k] = nil
}
}