mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-13 12:33:47 +08:00
tiny bug fix
This commit is contained in:
@@ -55,7 +55,7 @@ func (h *EchoHandler)Handle(ctx context.Context, conn net.Conn) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
logger.Info("connection close")
|
logger.Info("connection close")
|
||||||
h.activeConn.Delete(conn)
|
h.activeConn.Delete(client)
|
||||||
} else {
|
} else {
|
||||||
logger.Warn(err)
|
logger.Warn(err)
|
||||||
}
|
}
|
||||||
|
@@ -68,11 +68,11 @@ func ListenAndServe(cfg *Config, handler tcp.Handler) {
|
|||||||
}
|
}
|
||||||
// handle
|
// handle
|
||||||
logger.Info("accept link")
|
logger.Info("accept link")
|
||||||
|
waitDone.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer func() {
|
defer func() {
|
||||||
waitDone.Done()
|
waitDone.Done()
|
||||||
}()
|
}()
|
||||||
waitDone.Add(1)
|
|
||||||
handler.Handle(ctx, conn)
|
handler.Handle(ctx, conn)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user