make sure to *fully* close streams

We need to wait for the EOF from the other side when closing from the sending
side (unless we've already seen an EOF).
This commit is contained in:
Steven Allen 2018-03-08 09:46:56 -08:00
parent d02440c25d
commit f6afd637b8
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func (p *PubSub) handleSendingMessages(ctx context.Context, s inet.Stream, outgo
return bufw.Flush()
}
defer s.Close()
defer inet.FullClose(s)
for {
select {
case rpc, ok := <-outgoing: