Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
135
noc
Commits
9b80ebf6
Commit
9b80ebf6
authored
Aug 24, 2020
by
Andrey Vertiprahov
Browse files
Close CLI stream if 'Connection reset' receive.
parent
2c84f087
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/script/cli/cli.py
View file @
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment