Skip to content

Commit

Permalink
use sync mode to ensure correct sequenct of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
terjesannum committed Dec 11, 2023
1 parent 272f0d8 commit d61d747
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func (h *Home) SubscribeMeasurements(ctx context.Context, hc *http.Client, wsUrl
subscriber := graphql.NewSubscriptionClient(wsUrl)
subscriber.WithProtocol(graphql.GraphQLWS)
subscriber.WithConnectionParams(map[string]interface{}{"token": token})
subscriber.WithSyncMode(true)
subscriber.WithLog(log.Println)
subscriber.WithRetryTimeout(time.Second * 5)
subscriber.WithWebSocketOptions(graphql.WebsocketOptions{HTTPClient: hc})
Expand Down

0 comments on commit d61d747

Please sign in to comment.