stream: Return early in stream._exec_write if the handle is closed

This commit is contained in:
Yury Selivanov 2016-05-18 12:18:12 -04:00
parent 0c099840ba
commit 83ae4ef921
1 changed files with 5 additions and 0 deletions

View File

@ -373,6 +373,11 @@ cdef class UVStream(UVBaseTransport):
int err
_StreamWriteContext ctx
if self._closed:
# If the handle is closed, just return, it's too
# late to do anything.
return
ctx = _StreamWriteContext.new(self, self._buffer)
if ctx.py_bufs_sml_inuse: