Skip to content

Commit

Permalink
disabling eventbus on windows, causes deadlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Sep 13, 2023
1 parent ce8efdb commit 85986cf
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions backend/pkg/web/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"net/http"
"runtime"
"strings"
)

Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 85986cf

Please sign in to comment.