sip2: be more reliable if connection fails
the initial sip telnet client implementation is prone to errors. first, it swallows some errors. second, it never times out.
-
use a telnet client library that uses net.DialTimeout
instead ofnet.DialTo
-
refactor client to use channels, in a way that a single goroutine is serially processing connections and returning responses -
send a get-status request every 5 minutes or so, to keep the connection up -
if everything fails, try to reset the connection
Edited by Kali Kaneko