OpenIPC / majestic

Majestic Community edition integration kit
MIT License
31 stars 5 forks source link

RTMP reconnection and timeout settings #160

Closed noniepark closed 3 months ago

noniepark commented 3 months ago

Hi

I would like to configure number of reconnect attempt and reconnect timeout for RTMP protocol. By default, maximum number of RTMP reconnection is 200 and timeout is 5 seconds. So when the network was down or my service on the server is unavailable for a moment and it gave up to reconnect. Since there's no description or guide for these parameter modification in majestic.full or majestic.yaml. Is there a way to change these numbers? Would be nice if number of attempt can set to infinity.

Thank you.

skilurius commented 3 months ago

This was addressed on the current build, the new logic works as follows:

    0-200 tries = 10 seconds timeout
  200-500 tries = 60 seconds timeout
 500-1000 tries = 300 seconds timeout
    1000+ tries = 600 seconds timeout

It was initially intended not to reconnect indefinitely to avoid ddos on unmaintained devices, but if one request is done every 10 minutes it should not cause any problems.

noniepark commented 3 months ago

Thank you for your suggestion.