Skip to content

Commit

Permalink
conn: delete from pending on close
Browse files Browse the repository at this point in the history
  • Loading branch information
AnshulMalik committed Dec 3, 2024
1 parent 534fd43 commit ccd64f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ccd64f0

Please sign in to comment.