Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
fix: eventstream subscription string ack
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed Dec 4, 2023
1 parent d54d684 commit 97e478d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/app/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
func (s *Server) setRoutes() {
s.router.Use(s.Middleware())
s.router.HandleFunc("/v3", s.handleV3)
s.router.HandleFunc("/v3{sub?:\\@(.*)}", s.handleV3)
s.router.HandleFunc("/v3{sub:\\@(.*)}", s.handleV3)

s.router.HandleFunc("/health", s.HandleHealth)
}
4 changes: 2 additions & 2 deletions internal/app/v3/v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ func SSE(gctx global.Context, conn client.Connection, w http.ResponseWriter, r *

conn.SetWriter(bufio.NewWriter(w), f)

conn.Read(gctx)

go func() {
<-conn.OnReady() // wait for the connection to be ready
if conn.Context().Err() != nil {
Expand Down Expand Up @@ -83,5 +81,7 @@ func SSE(gctx global.Context, conn client.Connection, w http.ResponseWriter, r *
}
}()

conn.Read(gctx)

return nil
}
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ variable "image_pull_policy" {

variable "heartbeat_interval" {
type = number
default = 28000
default = 45000
}

variable "subscription_limit" {
Expand Down

0 comments on commit 97e478d

Please sign in to comment.