aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/incoming/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'forged/internal/incoming/hooks')
-rw-r--r--forged/internal/incoming/hooks/hooks.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/forged/internal/incoming/hooks/hooks.go b/forged/internal/incoming/hooks/hooks.go
index c021406..3be0811 100644
--- a/forged/internal/incoming/hooks/hooks.go
+++ b/forged/internal/incoming/hooks/hooks.go
@@ -2,6 +2,7 @@ package hooks
import (
"context"
+ "errors"
"fmt"
"net"
@@ -59,7 +60,9 @@ func (server *Server) Run(ctx context.Context) error {
for {
conn, err := listener.Accept()
if err != nil {
- // TODO: Handle errors caused by context cancel
+ if errors.Is(err, net.ErrClosed) {
+ return nil
+ }
return fmt.Errorf("accept conn: %w", err)
}