teamspeak-query icon indicating copy to clipboard operation
teamspeak-query copied to clipboard

Timeout for single commands

Open schroffl opened this issue 5 years ago • 2 comments

This is extracted from an issue (#22) by @winterwings

[...] I would also like to see request timeouts when a connection is not lost, but there was no response for some reason. (Happened this spring when hosting in France lost connection to London and their second router didn't really handle the huge traffic spike. Very slow connection and frequent packet losses as a result.) [...]

schroffl avatar May 29 '20 23:05 schroffl

Hey @winterwings, is there a specific API you wish for? Do you want to be able to set the timeout per-command like this query.sendTimeout(5000, 'my-command', 'params').

schroffl avatar Jun 14 '20 12:06 schroffl

Perhaps something simpler like query.setTimeout(5000)?
I don't see a case where you want to have an individual timeout per command. It would make the code kinda messy or I would have to make a wrapper for it like query.sendsafe = ...args => query.sendTimeout(5000, ...args) which is not a big deal, but... :)

winterwings avatar Jun 19 '20 07:06 winterwings