I'm building a non-torrent open-source project using webtorrent trackers, I try to be as polite as possible (only one persistent connection is present, the other players disconnect once a webrtc connection is live), you can check it out here.
I found out that most webtorrent trackers close the connection after 1.7 minutes without data, even if the tracker requested an interval of 120 seconds (2m), I didn't see anything related in this code so I'm assuming it's external (nginx timeout or similar?).
Is it an expected behaviour?
A workaround that I found is to send {"action":"scrape","info_hash":[]} as a "ping" message (unfortunately, browser js can't access websocket PINGs) but it seems not to work on openwebtorrent tracker (the connection gets forcibly closed, also not expected from the code).
Hello,
I'm building a non-torrent open-source project using webtorrent trackers, I try to be as polite as possible (only one persistent connection is present, the other players disconnect once a webrtc connection is live), you can check it out here.
I found out that most webtorrent trackers close the connection after 1.7 minutes without data, even if the tracker requested an interval of 120 seconds (2m), I didn't see anything related in this code so I'm assuming it's external (nginx timeout or similar?). Is it an expected behaviour?
A workaround that I found is to send
{"action":"scrape","info_hash":[]}
as a "ping" message (unfortunately, browser js can't access websocket PINGs) but it seems not to work on openwebtorrent tracker (the connection gets forcibly closed, also not expected from the code).Thanks for all of your work!