mirror of
https://github.com/matrix-org/pinecone.git
synced 2026-01-16 23:00:32 +00:00
Don't shut down the conn if it isn't set (in the case of local peer)
This commit is contained in:
parent
20c54cefc0
commit
e6e59c3fc3
1 changed files with 3 additions and 1 deletions
|
|
@ -154,7 +154,9 @@ func (p *peer) stop(err error) {
|
|||
// Next we'll send a message to the state inbox in order to clean up.
|
||||
p.router.state.Act(nil, func() {
|
||||
// Make sure that the connection is closed.
|
||||
_ = p.conn.Close()
|
||||
if p.conn != nil {
|
||||
_ = p.conn.Close()
|
||||
}
|
||||
|
||||
// Drop all of the frames that are sitting in this peer's queues, since there
|
||||
// is no way to send them at this point.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue