Commit 3b86e5ef authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Merge branch 'noc-1365' into 'master'

noc/noc#1365 Close CLI stream if 'Connection reset' receive.

See merge request noc/noc!4215
parents a9eecce8 9b80ebf6
......@@ -192,6 +192,8 @@ class CLI(BaseCLI):
raise self.timeout_exception_cls()
if not r:
self.logger.debug("Connection reset")
# For socket close on device we close it on system
self.close_stream()
await self.on_failure(r, None, error_cls=CLIConnectionReset)
if r == self.SYNTAX_ERROR_CODE:
metrics["cli_syntax_errors", ("proto", self.name)] += 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment