ing
This commit is contained in:
parent
1429e17a4d
commit
8f0c07d9cf
|
@ -98,7 +98,7 @@ func handleServer(s *server) {
|
|||
defer s.stopWg.Done()
|
||||
|
||||
if err := s.httpServer.Serve(s.listener); nil != err {
|
||||
logging.Logger.Error(fmt.Sprintf("Server: Server err - %v", err))
|
||||
logging.Logger().Error(fmt.Sprintf("Server: Server err - %v", err))
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -150,7 +150,7 @@ func (s *server) handleError(ctx *fasthttp.RequestCtx, status int, reason error)
|
|||
func handleConnection(s *server, soc *Socket, socketHandler SocketHandler) {
|
||||
defer s.stopWg.Done()
|
||||
|
||||
logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is connected.", soc.RemoteAddr()))
|
||||
logging.Logger().Debug(fmt.Sprintf("Server: Client[%s] is connected.", soc.RemoteAddr()))
|
||||
clientStopChan := make(chan struct{})
|
||||
handleDoneChan := make(chan struct{})
|
||||
|
||||
|
@ -163,7 +163,7 @@ func handleConnection(s *server, soc *Socket, socketHandler SocketHandler) {
|
|||
<-handleDoneChan
|
||||
case <-handleDoneChan:
|
||||
close(clientStopChan)
|
||||
logging.Logger.Debug(fmt.Sprintf("Server: Client[%s] is disconnected.", soc.RemoteAddr()))
|
||||
logging.Logger().Debug(fmt.Sprintf("Server: Client[%s] is disconnected.", soc.RemoteAddr()))
|
||||
soc.Close()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user