Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
ead67de8
Commit
ead67de8
authored
Sep 21, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: make Side.write() return None rather than crash if side already closed.
parent
74b31bbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
mitogen/core.py
mitogen/core.py
+4
-1
No files found.
mitogen/core.py
View file @
ead67de8
...
...
@@ -483,6 +483,9 @@ class Side(object):
return
s
def
write
(
self
,
s
):
if
self
.
fd
is
None
:
return
None
written
,
disconnected
=
io_op
(
os
.
write
,
self
.
fd
,
s
[:
CHUNK_SIZE
])
if
disconnected
:
return
None
...
...
@@ -613,7 +616,7 @@ class Stream(BasicStream):
written
=
self
.
transmit_side
.
write
(
self
.
_output_buf
)
if
written
is
None
:
LOG
.
debug
(
'%r.on_transmit(): disconnection detected'
,
self
)
self
.
on_disconnect
()
self
.
on_disconnect
(
broker
)
return
IOLOG
.
debug
(
'%r.on_transmit() -> len %d'
,
self
,
written
)
...
...
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