Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rodaine committed May 14, 2019
1 parent a6c3f5a commit 5008222
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ func (socket *mongoSocket) kill(err error, abend bool) {

logf("Socket %p to %s: closing: %s (abend=%v)", socket, socket.addr, err.Error(), abend)
socket.dead = err
socket.conn.Close()
if socket.conn != nil {
socket.conn.Close()
}
stats.socketsAlive(-1)
replyFuncs := socket.replyFuncs
socket.replyFuncs = make(map[uint32]replyFunc)
Expand Down

0 comments on commit 5008222

Please sign in to comment.