Skip to content

Commit 18eb343

Browse files
committed
fix double CLOSE not printing anything
1 parent 1b381cc commit 18eb343

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

monitor.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ func (d *Server) close(messageErr string) {
252252
d.closeFuncMutex.Lock()
253253
defer d.closeFuncMutex.Unlock()
254254
if d.clientConn == nil {
255-
// TODO
256-
// d.outputChan <- messageError("close", "port already closed")
255+
if messageErr == "" {
256+
d.outputChan <- messageError("close", "port already closed")
257+
}
257258
return
258259
}
259260
connErr := d.clientConn.Close()

0 commit comments

Comments
 (0)