From 3a437b10a46a2e81522b0668e5d925f46b24bb9b Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 7 Nov 2017 11:57:26 +0900 Subject: [PATCH] ing --- server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index e2c4800..0f25708 100644 --- a/server.go +++ b/server.go @@ -126,15 +126,15 @@ func handleConnection(s *server, conn net.Conn) { logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is connected.", conn.RemoteAddr())) clientStopChan := make(chan struct{}) - handleDoneCnah := make(chan struct{}) - go s.sh.Handle(conn, clientStopChan, handleDoneCnah) + handleDoneChan := make(chan struct{}) + go s.sh.Handle(conn, clientStopChan, handleDoneChan) select { case <-s.stopChan: close(clientStopChan) conn.Close() - <-handleDoneCnah - case <-handleDoneCnah: + <-handleDoneChan + case <-handleDoneChan: close(clientStopChan) conn.Close() logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is disconnected.", conn.RemoteAddr()))