Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit d8e5efe

Browse files
fix: Stop looping retries after dial failure (#349)
* fix: Stop looping retries after dial failure * Merge if statements Co-authored-by: Dean Sheather <[email protected]> Co-authored-by: Dean Sheather <[email protected]>
1 parent 9ddbd85 commit d8e5efe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wsnet/listen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func Listen(ctx context.Context, broker string) (io.Closer, error) {
4949
case <-ctx.Done():
5050
err = ctx.Err()
5151
}
52-
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
52+
if err == nil || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
5353
break
5454
}
5555
}

0 commit comments

Comments
 (0)