fix_: flaky TestSignalsServer (#5838)

This commit is contained in:
Igor Sirotin 2024-09-16 13:38:50 +01:00 committed by GitHub
parent f51d4654f6
commit 596d75ab79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ func (s *Server) Listen(address string) error {
ReadHeaderTimeout: 5 * time.Second,
}
http.HandleFunc("/signals", s.signals)
mux := http.NewServeMux()
mux.HandleFunc("/signals", s.signals)
s.server.Handler = mux
listener, err := net.Listen("tcp", address)
if err != nil {