Reconnecting #10

Closed
opened 2023-09-22 10:08:13 -04:00 by er1z · 6 comments
er1z commented 2023-09-22 10:08:13 -04:00 (Migrated from github.com)

Can you add a support to reconnect the ntfy server if connection drops/server was killed?

Can you add a support to reconnect the ntfy server if connection drops/server was killed?
alexhorner commented 2023-09-22 10:23:51 -04:00 (Migrated from github.com)

I believe the reason I did not do this was because it would require a fair restructure of how listener threads were started up. Just going off memory though, I'll look a little later

I believe the reason I did not do this was because it would require a fair restructure of how listener threads were started up. Just going off memory though, I'll look a little later
alexhorner commented 2023-09-22 15:05:10 -04:00 (Migrated from github.com)

I have checked this and we do attempt a reconnect once every 3 seconds, for a maximum of 10 attempts (30 seconds). After a sucessful connection, the attempts are reset back to 0 so upon the next disconnection, it will once again make 10 more attempts.

I have checked this and we do attempt a reconnect once every 3 seconds, for a maximum of 10 attempts (30 seconds). After a sucessful connection, the attempts are reset back to 0 so upon the next disconnection, it will once again make 10 more attempts.
er1z commented 2023-09-22 15:09:49 -04:00 (Migrated from github.com)

Once I restarted ntfy, no notifications were received anymore. But may be this is due to the fact that I started it after 30 seconds. How about allowing to customize this period?

Once I restarted ntfy, no notifications were received anymore. But may be this is due to the fact that I started it after 30 seconds. How about allowing to customize this period?
alexhorner commented 2023-09-22 15:11:14 -04:00 (Migrated from github.com)

Once I restarted ntfy, no notifications were received anymore. But may be this is due to the fact that I started it after 30 seconds. How about allowing to customize this period?

This 30 seconds is split into two numbers, 3 second wait at 10 attempts. We could probably expose these as options?

> Once I restarted ntfy, no notifications were received anymore. But may be this is due to the fact that I started it after 30 seconds. How about allowing to customize this period? This 30 seconds is split into two numbers, 3 second wait at 10 attempts. We could probably expose these as options?
er1z commented 2023-10-03 06:02:40 -04:00 (Migrated from github.com)

That may work out.

That may work out.
alexhorner commented 2023-10-09 16:22:35 -04:00 (Migrated from github.com)

Hi @er1z

Please see PR #11 for the updates based on this conversation. They allow you to adjust the values.

Please also note that after all attempts have been exhausted, you will get an error popup for each topic. This happened already, so you should have seen this in your previous test.

Hi @er1z Please see PR #11 for the updates based on this conversation. They allow you to adjust the values. Please also note that after all attempts have been exhausted, you will get an error popup for each topic. This happened already, so you should have seen this in your previous test.
Sign in to join this conversation.
No description provided.