diff options
author | Runxi Yu <me@runxiyu.org> | 2025-08-17 13:31:41 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-08-17 13:36:51 +0800 |
commit | a7bd17c605e79446d8bf02e474c91986c615b36a (patch) | |
tree | 6d9b610c259c92eadda56ecf20943670ae426224 /forged/internal/incoming/hooks | |
parent | Tidying (diff) | |
download | forge-a7bd17c605e79446d8bf02e474c91986c615b36a.tar.gz forge-a7bd17c605e79446d8bf02e474c91986c615b36a.tar.zst forge-a7bd17c605e79446d8bf02e474c91986c615b36a.zip |
Linting
Diffstat (limited to 'forged/internal/incoming/hooks')
-rw-r--r-- | forged/internal/incoming/hooks/hooks.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/forged/internal/incoming/hooks/hooks.go b/forged/internal/incoming/hooks/hooks.go index 52ccb0f..65277d4 100644 --- a/forged/internal/incoming/hooks/hooks.go +++ b/forged/internal/incoming/hooks/hooks.go @@ -40,6 +40,7 @@ func New(config Config) (server *Server) { return &Server{ socketPath: config.Socket, executablesPath: config.Execs, + hookMap: cmap.Map[string, hookInfo]{}, } } @@ -71,7 +72,9 @@ func (server *Server) Run(ctx context.Context) error { } func (server *Server) handleConn(ctx context.Context, conn net.Conn) { - defer conn.Close() + defer func() { + _ = conn.Close() + }() unblock := context.AfterFunc(ctx, func() { _ = conn.SetDeadline(time.Now()) _ = conn.Close() |