csm-aut / csm

This repository contains Cisco Software Manager (CSM Server) source code
Apache License 2.0
11 stars 7 forks source link

Handling connection error during command execution and destroying the connection #11

Closed kstaniek closed 9 years ago

kstaniek commented 9 years ago

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.