You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will look at putting in some number of retries. or a progressively longer retry wait loop state. But at some point is is nice to just kill the plugin if Touch Portal isn't running anymore, as if Touch portal is started again, it will restart all plugins and now you have 2 plugins connected.
I'm late to the party but wanted to chime in that this simply won't work, at least with TP v3.x.
The main problem is that TP doesn't always shut down plugins correctly on exit. Most of the time it simply closes the socket w/out any closePlugin message at all. (I've gone through this with Reinier, who recreated/confirmed the issue.) This should be fixed in TP v4, but who knows when that will be ready.
In any case, pretty much the only time you're gonna get a network error on a localhost connection is when the server/other side has gone away. Or your whole network stack crashed. In either case it's pointless to try re-connecting blindly, and as mentioned TP will restart the plugin anyway when it restarts, according to the user's settings. There's no way to tell if TP is actually running or not short of examining all the system's running processes, and even then it doesn't tell you if it maybe has actually crashed/hung but not been killed yet.
Even when the shutdown issue is fixed and (if) TP v4 allows remote plugin plugin connections, I think it should still be up to the plugin author to decide what to do in case of an unexpected socket error. Having the option for TP Client to not exit automatically on error will take care of that, perhaps with a way to pass on the original socket error.
while working on the new ITunes plugin , I have noted that socket connections that terminates doesn't try to reconnect:
that said, you should reconnect here:
touchportal-node-api/src/client.js
Line 265 in 0fa9ad8
The text was updated successfully, but these errors were encountered: