From e1cd84e9d662f0725b49a0089f42a69865605e98 Mon Sep 17 00:00:00 2001 From: dominicriordan Date: Sat, 2 Dec 2023 00:41:12 +0000 Subject: [PATCH] test server - debug new conns --- cmd/payloader/test-server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/payloader/test-server.go b/cmd/payloader/test-server.go index f71038f..981f5c2 100644 --- a/cmd/payloader/test-server.go +++ b/cmd/payloader/test-server.go @@ -85,6 +85,13 @@ var runServerCmd = &cobra.Command{ var err error server := fasthttp.Server{ + ConnState: func(c net.Conn, s fasthttp.ConnState) { + if debug { + if s == fasthttp.StateNew { + log.Println("new conn") + } + } + }, Handler: func(c *fasthttp.RequestCtx) { _, err = c.WriteString(response) if err != nil {