mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-16 04:04:56 +02:00
conn: delete from pending on close
This commit is contained in:
parent
534fd43609
commit
ccd64f0b4d
1 changed files with 2 additions and 1 deletions
3
conn.go
3
conn.go
|
|
@ -173,8 +173,9 @@ func (c *Conn) close(cause error) error {
|
|||
return ErrClosed
|
||||
}
|
||||
|
||||
for _, call := range c.pending {
|
||||
for id, call := range c.pending {
|
||||
close(call.done)
|
||||
delete(c.pending, id)
|
||||
}
|
||||
|
||||
if cause != nil && cause != io.EOF && cause != io.ErrUnexpectedEOF {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue