Skip to content

Commit

Permalink
fix stuck at mutex when reconnecting and error happens in Gateway.Open
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed May 24, 2024
1 parent 3599a10 commit 6e8840f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gateway/gateway_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ func (g *gatewayImpl) open(ctx context.Context) error {
g.lastHeartbeatSent = time.Now().UTC()
conn, rs, err := g.config.Dialer.DialContext(ctx, gatewayURL, nil)
if err != nil {
g.Close(ctx)
body := "empty"
body := ""
if rs != nil && rs.Body != nil {
defer func() {
_ = rs.Body.Close()
Expand Down

0 comments on commit 6e8840f

Please sign in to comment.