From 85986cf95c5b3edaed901ef2ac711fe4b9193751 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Wed, 13 Sep 2023 13:55:44 -0700 Subject: [PATCH] disabling eventbus on windows, causes deadlock. --- backend/pkg/web/server.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/pkg/web/server.go b/backend/pkg/web/server.go index 278623fb..beb9a36c 100644 --- a/backend/pkg/web/server.go +++ b/backend/pkg/web/server.go @@ -10,6 +10,7 @@ import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" "net/http" + "runtime" "strings" ) @@ -78,12 +79,15 @@ func (ae *AppEngine) Setup() (*gin.RouterGroup, *gin.Engine) { secure.POST("/query", handler.QueryResourceFhir) - //server-side-events handler - secure.GET("/events/stream", - middleware.SSEHeaderMiddleware(), - middleware.SSEEventBusServerMiddleware(ae.Logger), - handler.SSEStream, - ) + //server-side-events handler (only supported on mac/linux) + // TODO: causes deadlock on Windows + if runtime.GOOS != "windows" { + secure.GET("/events/stream", + middleware.SSEHeaderMiddleware(), + middleware.SSEEventBusServerMiddleware(ae.Logger), + handler.SSEStream, + ) + } } if ae.Config.GetBool("web.allow_unsafe_endpoints") {