Skip to content

fix: Do not retry connection if data is too large#586

Merged
janthurau merged 3 commits intomainfrom
tom/message-too-big
Apr 23, 2023
Merged

fix: Do not retry connection if data is too large#586
janthurau merged 3 commits intomainfrom
tom/message-too-big

Conversation

@tommoor
Copy link
Contributor

@tommoor tommoor commented Apr 23, 2023

In this particular error case the data isn't going to get smaller for the same document/connection so this sensible thing to do is stop retrying immediately.

Without this logic the websocket provider will retry in a tight loop – this can potentially be abused to take down the server and will certainly overload it if the message payload is large enough.

We should also look separately at having the retry backoff to a more reasonable value like 5-10 seconds.

@tommoor tommoor requested a review from janthurau April 23, 2023 16:20
@janthurau janthurau merged commit 462a87f into main Apr 23, 2023
@janthurau janthurau deleted the tom/message-too-big branch April 23, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants