mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
rework logging code
This commit is contained in:
@@ -82,7 +82,7 @@ func NewSession(server *Server, conn net.Conn) *Session {
|
|||||||
// Start starts the session packet send and recv loop(s).
|
// Start starts the session packet send and recv loop(s).
|
||||||
func (s *Session) Start() {
|
func (s *Session) Start() {
|
||||||
go func() {
|
go func() {
|
||||||
s.logger.Info("Channel server got connection!", zap.String("remoteaddr", s.rawConn.RemoteAddr().String()))
|
s.logger.Debug("New connection", zap.String("RemoteAddr", s.rawConn.RemoteAddr().String()))
|
||||||
// Unlike the sign and entrance server,
|
// Unlike the sign and entrance server,
|
||||||
// the client DOES NOT initalize the channel connection with 8 NULL bytes.
|
// the client DOES NOT initalize the channel connection with 8 NULL bytes.
|
||||||
go s.sendLoop()
|
go s.sendLoop()
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func (s *Server) Start() error {
|
|||||||
|
|
||||||
// Shutdown exits the server gracefully.
|
// Shutdown exits the server gracefully.
|
||||||
func (s *Server) Shutdown() {
|
func (s *Server) Shutdown() {
|
||||||
s.logger.Debug("Shutting down")
|
s.logger.Debug("Shutting down...")
|
||||||
|
|
||||||
s.Lock()
|
s.Lock()
|
||||||
s.isShuttingDown = true
|
s.isShuttingDown = true
|
||||||
|
|||||||
Reference in New Issue
Block a user