When the connection error is detected either unexpected or caused by the command (exit, reload) then the respective exception is raised and connection is destroyed. It fixes the situation when after device reload the connection stays active but referring to jumphost not the destined device.
After catching ConnectionError exception during command execution the code should execute connect method again. No explicit disconnect method call is needed anymore.
When the connection error is detected either unexpected or caused by the command (exit, reload) then the respective exception is raised and connection is destroyed. It fixes the situation when after device reload the connection stays active but referring to jumphost not the destined device. After catching ConnectionError exception during command execution the code should execute connect method again. No explicit disconnect method call is needed anymore.