Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to set websocket ping interval and timeout #1048

Merged
merged 10 commits into from Jun 9, 2021

Conversation

euri10
Copy link
Member

@euri10 euri10 commented May 29, 2021

Fixes #245

I tested this manually and can see ping/pong frames flying when I set it to a low interval, but could not find a clever way to add tests as I do not know exactly what should be tested since the ping/pong mechanism is automatically handled by websockets, maybe someone would have an idea

@euri10 euri10 requested a review from Kludex May 29, 2021 14:29
@euri10 euri10 mentioned this pull request May 31, 2021
3 tasks
@qeternity
Copy link

Would love to see this merged

Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@euri10 Just that small issue, and it's fine.

uvicorn/main.py Outdated Show resolved Hide resolved
uvicorn/main.py Outdated Show resolved Hide resolved
euri10 and others added 2 commits June 9, 2021 09:11
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
@euri10
Copy link
Member Author

euri10 commented Jun 9, 2021

@euri10 Just that small issue, and it's fine.

done ! that's why another pair of eyes is so important >_)

Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two as well. But I'll let my approval so you can merge after fixing it. ✌️

docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
euri10 and others added 2 commits June 9, 2021 09:48
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
@euri10 euri10 merged commit f66e717 into encode:master Jun 9, 2021
@euri10 euri10 deleted the ws_pings branch June 9, 2021 07:51
Kludex added a commit that referenced this pull request Nov 17, 2021
* Add max size to webosckets implementation

* Adde ping interval and timeout to websockets inplmenetation

* Post-merge glitches corrected

* Added some docs

* Corrected flags

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Corrected flags

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Updated docs

* Update docs/settings.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Update docs/settings.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
@ChaitanyaYeole02
Copy link

ChaitanyaYeole02 commented Aug 22, 2022

@euri10
How can I disable ws_ping_interval and ws_ping_timeout?

Kludex added a commit to sephioh/uvicorn that referenced this pull request Oct 29, 2022
* Add max size to webosckets implementation

* Adde ping interval and timeout to websockets inplmenetation

* Post-merge glitches corrected

* Added some docs

* Corrected flags

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Corrected flags

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Updated docs

* Update docs/settings.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Update docs/settings.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
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.

Add ping-interval and ping-timeout options
4 participants