Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mirror
sjrpc
Commits
f41b6ab7
Commit
f41b6ab7
authored
Jan 31, 2011
by
Antoine Millet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better disconnection handling.
parent
d6a7106b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
sjrpc/core/connectionmanagers.py
sjrpc/core/connectionmanagers.py
+4
-2
sjrpc/core/rpcconnection.py
sjrpc/core/rpcconnection.py
+4
-2
No files found.
sjrpc/core/connectionmanagers.py
View file @
f41b6ab7
...
...
@@ -177,7 +177,8 @@ class ConnectionManager(object):
'''
fd
=
connection
.
get_fd
()
self
.
_poll
.
modify
(
fd
,
ConnectionManager
.
MASK_WRITABLE
)
if
fd
is
not
None
:
self
.
_poll
.
modify
(
fd
,
ConnectionManager
.
MASK_WRITABLE
)
def
nothing_to_write
(
self
,
connection
):
'''
...
...
@@ -189,7 +190,8 @@ class ConnectionManager(object):
'''
fd
=
connection
.
get_fd
()
self
.
_poll
.
modify
(
fd
,
ConnectionManager
.
MASK_NORMAL
)
if
fd
is
not
None
:
self
.
_poll
.
modify
(
fd
,
ConnectionManager
.
MASK_NORMAL
)
def
handle_event
(
self
,
fd
,
event
):
'''
...
...
sjrpc/core/rpcconnection.py
View file @
f41b6ab7
...
...
@@ -428,8 +428,10 @@ class RpcConnection(object):
:return: the file descriptor number of the socket
'''
return
self
.
_sock
.
fileno
()
try
:
return
self
.
_sock
.
fileno
()
except
socket
.
error
:
return
None
def
getpeername
(
self
):
'''
...
...
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