diff --git a/main.go b/main.go index e3e3b09..4b100dc 100644 --- a/main.go +++ b/main.go @@ -40,10 +40,7 @@ func main() { } else { serveMux := http.NewServeMux() wsh.RegisterHandlers(serveMux, *prefix) - defer wsh.Cleanup() - tv.RegisterHandlers(ctx, serveMux, *prefix) - defer tv.Cleanup() server := gocommon.NewHTTPServer(serveMux) logger.Println("tavern is started") @@ -53,5 +50,7 @@ func main() { logger.Println(err) } cancel() + wsh.Cleanup() + tv.Cleanup() } }