From 0a8fc47e5092dab9d5df35997974443a4c27031a Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sat, 18 Jan 2020 15:40:50 +0100 Subject: [PATCH] Reduce ping interval Some reverse proxies have default timeouts of 60 seconds after they close the websocket connetion. Fixes #245 --- router/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/router.go b/router/router.go index 520d8a5..f3cb87f 100644 --- a/router/router.go +++ b/router/router.go @@ -26,7 +26,7 @@ func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Co g.Use(gin.Logger(), gin.Recovery(), error.Handler(), location.Default()) g.NoRoute(error.NotFound()) - streamHandler := stream.New(200*time.Second, 15*time.Second, conf.Server.Stream.AllowedOrigins) + streamHandler := stream.New(45*time.Second, 15*time.Second, conf.Server.Stream.AllowedOrigins) authentication := auth.Auth{DB: db} messageHandler := api.MessageAPI{Notifier: streamHandler, DB: db} healthHandler := api.HealthAPI{DB: db}