Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyrasite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
pyrasite
Commits
b9f8d553
Commit
b9f8d553
authored
Mar 14, 2012
by
Luke Macken
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20 from ryazwinski/develop
handle failed reverse connections gracefully
parents
c6a3ac53
4b5e9293
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
pyrasite/reverse.py
pyrasite/reverse.py
+5
-0
No files found.
pyrasite/reverse.py
View file @
b9f8d553
...
@@ -70,13 +70,18 @@ class ReverseConnection(threading.Thread, PyrasiteIPC):
...
@@ -70,13 +70,18 @@ class ReverseConnection(threading.Thread, PyrasiteIPC):
continue
continue
break
break
if
not
self
.
sock
:
raise
Exception
(
'pyrasite cannot establish reverse connection to %s:%d'
%
(
self
.
host
,
self
.
port
))
self
.
on_connect
()
self
.
on_connect
()
while
running
:
while
running
:
cmd
=
self
.
recv
()
cmd
=
self
.
recv
()
if
cmd
is
None
or
cmd
==
"quit
\
n
"
or
len
(
cmd
)
==
0
:
if
cmd
is
None
or
cmd
==
"quit
\
n
"
or
len
(
cmd
)
==
0
:
running
=
False
running
=
False
else
:
else
:
running
=
self
.
on_command
(
cmd
)
running
=
self
.
on_command
(
cmd
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
str
(
e
))
print
(
str
(
e
))
running
=
False
running
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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