From fdd43730f11f5b0aea452eb6cdd77d45bc6668e7 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 2 Nov 2024 23:01:05 +0000 Subject: [PATCH] chore(pkg/server): shutdown without waiting for connections to close - UDP server tend not to terminate connections on time --- pkg/server/subserver.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/server/subserver.go b/pkg/server/subserver.go index 2a06f50b..a9892764 100644 --- a/pkg/server/subserver.go +++ b/pkg/server/subserver.go @@ -118,11 +118,7 @@ func (s *subServer) Stop() (err error) { s.state = goservices.StateStopping s.stateMutex.Unlock() - const shutdownTimeout = 200 * time.Millisecond - shutdownCtx, shutdownCancel := context.WithTimeout( - context.Background(), shutdownTimeout) - defer shutdownCancel() - err = s.server.ShutdownContext(shutdownCtx) + err = s.server.Shutdown() s.state = goservices.StateStopped return err