Skip to content

Commit 5008222

Browse files
committed
checkpoint
1 parent a6c3f5a commit 5008222

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

socket.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ func (socket *mongoSocket) kill(err error, abend bool) {
350350

351351
logf("Socket %p to %s: closing: %s (abend=%v)", socket, socket.addr, err.Error(), abend)
352352
socket.dead = err
353-
socket.conn.Close()
353+
if socket.conn != nil {
354+
socket.conn.Close()
355+
}
354356
stats.socketsAlive(-1)
355357
replyFuncs := socket.replyFuncs
356358
socket.replyFuncs = make(map[uint32]replyFunc)

0 commit comments

Comments
 (0)