Page 1 of 1

Push2Run does not re-establish websocket when network interface changes

Posted: Sat Feb 09, 2019 6:28 am
by bobsmith
Hi. I Use Push2Run on a laptop. When the laptop is docked, it is using ethernet. When it's not docked, it is using wifi.

When Push2Run starts, it seems to "lock" onto one interface, so when I dock the laptop, Push2Run notices the wifi interface is down, but never attempts to re-establish its websocket on the now active ethernet. This makes Push2Run unusable unless I restart it while docked.

One positive is that when I undock, the wifi interface comes back up, and Push2Run successfully re-establishes the websocket on its own.

It would be nice if Push2Run attempts to re-establish its websocket at periodically so that a change in the network interface does not prevent it from working.

Here's a sample log:

I dock the laptop.
2019-02-08 16:46:50.078 - Network status is down

2019-02-08 16:46:50.433 - Websocket error
2019-02-08 16:46:50.434 - Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
2019-02-08 16:46:50.434 - Websocket closed

I undock the laptop.
2019-02-09 03:58:25.314 - Network status is up

2019-02-09 03:58:25.556 - Attempting to reconnect to Pushbullet
2019-02-09 03:58:26.374 - Connection with Pushbullet established

2019-02-09 03:58:26.491 - Connection with Pushbullet established

Re: Push2Run does not re-establish websocket when network interface changes

Posted: Sat Feb 09, 2019 8:22 am
by RobLatour
Thanks for letting me know - I can only imagine it would be a pain.

I'll take a look.

However, as a workaround, I suspect you can exit Push2Run and start it up again when you dock and undock. I know this would not be ideal, but again it would likely workaround the issue.

Re: Push2Run does not re-establish websocket when network interface changes

Posted: Sat Feb 09, 2019 9:21 am
by RobLatour
ok - turns out it was an easy update in the code, which I've now made and tested.

As I don't have a laptop with a docking station I did my best to emulate this by disabling and enabling my machine's ethernet connection (also by unplugging it and plugging it in again - which is more or less the same thing) to test my machine's fall back to its wifi connection.

It all seems to work fine with the updated code.

As I just released a new version of Push2Run last night, I'll hold this update for next general release. However, if you would like to test /use it moving forward just let me know and I can send you an early updated copy (the only change in it from the now current version would be this one update).

If you would like to do that, you may prefer to send me an email at info@push2run.com vs posting your email address here in this forum - and of course, your feedback would be welcome.

Re: Push2Run does not re-establish websocket when network interface changes

Posted: Sat Feb 09, 2019 4:32 pm
by bobsmith
Just a quick note to mention that I downloaded the fix from Rob, and his changes are working for the scenario of switching between ethernet and wifi interfaces. Thanks for finding a solution so quickly, Rob!
2019-02-09 15:12:04.457 - Started

2019-02-09 15:12:04.589 - Current network adapter is Wi-Fi

2019-02-09 15:12:04.630 - Network status is up

2019-02-09 15:12:06.196 - Connection with Pushbullet established

-----------------------------

2019-02-09 15:12:46.850 - Current network adapter is Ethernet

2019-02-09 15:13:47.035 - Websocket error
2019-02-09 15:13:47.037 - Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
2019-02-09 15:13:47.038 - Websocket closed

2019-02-09 15:13:47.898 - Attempting to reconnect to Pushbullet
2019-02-09 15:13:48.391 - Connection with Pushbullet established