I figured this problem out! All it took, was to add some error handling to catch the ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host error, and run the already existing except socket.timeout code again with a note pointing to the network adapter.
One could also catch the same error with just ConnectionResetError, but I figured the Exception as e was already being used in many places, so decided to just reuse it here.
This totally solves the problem as I would've expected.
I figured this problem out! All it took, was to add some error handling to catch the
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
error, and run the already existingexcept socket.timeout
code again with a note pointing to the network adapter.One could also catch the same error with just
ConnectionResetError
, but I figured theException as e
was already being used in many places, so decided to just reuse it here.This totally solves the problem as I would've expected.