Skip to content

Commit

Permalink
retry client connections idefinitely
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Jan 11, 2024
1 parent 3b56668 commit d2d4431
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ High-level interface for websockets.
- Uses channels for sending/receiving messages
- URI based API supporting `ws://` and `wss://` (for the client)
- Simple interface between client and server send/receive types
- Retries connection for the client automatically using [Stamina](https://github.com/cachix/stamina.hs)
- Retries connection indefinitely for the client automatically using [Stamina](https://github.com/cachix/stamina.hs)
- TODO: graceful shutdown

## Example
Expand Down
6 changes: 5 additions & 1 deletion src/Network/WebSockets/Typed/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ defaultOptions =
Options
{ headers = [],
messageLimit = 10000,
staminaSettings = Stamina.defaults,
staminaSettings =
Stamina.defaults
{ Stamina.maxTime = Nothing,
Stamina.maxAttempts = Nothing
},
staminaRetry = const $ return ()
}

Expand Down

0 comments on commit d2d4431

Please sign in to comment.