mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-07-04 08:13:40 +02:00
Mark Conn as closed even if closing stream fails
This commit is contained in:
parent
236b9e00cd
commit
0c9de81282
1 changed files with 1 additions and 5 deletions
|
|
@ -438,13 +438,9 @@ func (c *Conn) close(cause error) error {
|
||||||
c.logger.Printf("jsonrpc2: protocol error: %v\n", cause)
|
c.logger.Printf("jsonrpc2: protocol error: %v\n", cause)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := c.stream.Close(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
close(c.disconnect)
|
close(c.disconnect)
|
||||||
c.closed = true
|
c.closed = true
|
||||||
return nil
|
return c.stream.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) send(_ context.Context, m *anyMessage, wait bool) (cc *call, err error) {
|
func (c *Conn) send(_ context.Context, m *anyMessage, wait bool) (cc *call, err error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue