fix deadlock in websocket client conn

This commit is contained in:
ginuerzh
2024-01-12 23:46:22 +08:00
parent c04c28e1fd
commit 01168e9846
7 changed files with 122 additions and 77 deletions

View File

@ -84,6 +84,7 @@ func (h *httpHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler
log := h.options.Logger.WithFields(map[string]any{
"remote": conn.RemoteAddr().String(),
"local": conn.LocalAddr().String(),
"sid": ctxvalue.SidFromContext(ctx),
})
log.Infof("%s <> %s", conn.RemoteAddr(), conn.LocalAddr())
defer func() {