From c751f3a90e7b1c971399a61812adbad72c3fda04 Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Sun, 11 Apr 2021 19:50:56 +0800 Subject: [PATCH] fix disconnect event. --- utils/connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/connection.go b/utils/connection.go index c639f038..d7ff76f9 100644 --- a/utils/connection.go +++ b/utils/connection.go @@ -95,12 +95,12 @@ func (t *TCPListener) close() { func (t *TCPListener) invokePlanedDisconnect() { if t.planedDisconnect != nil { - t.planedDisconnect(t) + go t.planedDisconnect(t) } } func (t *TCPListener) invokeUnexpectedDisconnect(err error) { if t.unexpectedDisconnect != nil { - t.unexpectedDisconnect(t, err) + go t.unexpectedDisconnect(t, err) } }