zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
355 stars 357 forks source link

Improve error handling when a request fails due to the persistent connection being expired #761

Open timabbott opened 2 years ago

timabbott commented 2 years ago

Some networks drop long-lived inactive TCP connections, which can lead to connection errors when using the Zulip API bindings for some persistent jobs. We should ideally either enable a keep-alive, or perhaps a transparent retry for this class of connection error.

See https://github.com/zulip/zulip/commit/ff647dff03f178c329240c0e938d3fff8fbc5ab0 for an example.

Beanpen commented 1 year ago

@zulipbot claim

zulipbot commented 1 year ago

Welcome to Zulip, @Beanpen! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

Beanpen commented 1 year ago

Hi @timabbott I wonder if you mean to remove all the alias of "client = zulip.Client(...)" and instead directly call "zulip.Client(...)" in all files. Thank you!

zulipbot commented 1 year ago

@Beanpen You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

ryansong13 commented 1 year ago

@zulipbot claim

zulipbot commented 1 year ago

Welcome to Zulip, @ryansong13! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

ryansong13 commented 1 year ago

@zulipbot abandon

akshitadixit commented 1 year ago

@zulipbot claim

zulipbot commented 1 year ago

Welcome to Zulip, @akshitadixit! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zulipbot commented 1 year ago

@akshitadixit You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!