mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-12 20:20:16 +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 == io.EOF {
|
||||
logger.Info("connection close")
|
||||
h.activeConn.Delete(conn)
|
||||
h.activeConn.Delete(client)
|
||||
} else {
|
||||
logger.Warn(err)
|
||||
}
|
||||
|
@@ -68,11 +68,11 @@ func ListenAndServe(cfg *Config, handler tcp.Handler) {
|
||||
}
|
||||
// handle
|
||||
logger.Info("accept link")
|
||||
waitDone.Add(1)
|
||||
go func() {
|
||||
defer func() {
|
||||
waitDone.Done()
|
||||
}()
|
||||
waitDone.Add(1)
|
||||
handler.Handle(ctx, conn)
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user