When a script is ctrl-C'd on WIndows or Linux, it can leave open connections, which causes subsequent invocations not to work. This disconnects all connections when at script exits normally or is interrupted by a KeyboardInterrupt (ctrl-C).
Tested on Ubuntu, Windows 10, MacOS (latest), and Raspberry Pi.
When a script is ctrl-C'd on WIndows or Linux, it can leave open connections, which causes subsequent invocations not to work. This disconnects all connections when at script exits normally or is interrupted by a
KeyboardInterrupt
(ctrl-C).Tested on Ubuntu, Windows 10, MacOS (latest), and Raspberry Pi.