From 07300537c23245ffe16d5791c15cb55864289637 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 9 Nov 2017 15:15:00 +0900 Subject: [PATCH] ing --- server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.go b/server.go index 0f25708..a229bfe 100644 --- a/server.go +++ b/server.go @@ -88,7 +88,7 @@ func handleServer(s *server) { go func() { if conn, err = s.listener.Accept(); err != nil { if stopping.Load() == nil { - logging.Logger.Error(fmt.Sprintf("Server: Cannot accept new connection: [%s]", err)) + logging.Logger().Error(fmt.Sprintf("Server: Cannot accept new connection: [%s]", err)) } } else { conn, err = s.sh.OnAccept(conn) @@ -124,7 +124,7 @@ func handleServer(s *server) { func handleConnection(s *server, conn net.Conn) { defer s.stopWg.Done() - logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is connected.", conn.RemoteAddr())) + logging.Logger().Debug(fmt.Sprintf("Server: Client[%s] is connected.", conn.RemoteAddr())) clientStopChan := make(chan struct{}) handleDoneChan := make(chan struct{}) go s.sh.Handle(conn, clientStopChan, handleDoneChan) @@ -137,6 +137,6 @@ func handleConnection(s *server, conn net.Conn) { case <-handleDoneChan: close(clientStopChan) conn.Close() - logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is disconnected.", conn.RemoteAddr())) + logging.Logger().Debug(fmt.Sprintf("Server: Client[%s] is disconnected.", conn.RemoteAddr())) } }