Skip to content

Commit

Permalink
Merge pull request #14 from lschoe/main
Browse files Browse the repository at this point in the history
Fix issues #12 and #13.
  • Loading branch information
Vizonex authored Jan 8, 2024
2 parents e5bf0eb + a06673f commit d61f416
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion winloop/errors.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cython:langauge_level = 3
# cython:language_level = 3
from libc.string cimport strerror
# from includes._stdlib cimport *
from .includes cimport uv , system
Expand Down
4 changes: 2 additions & 2 deletions winloop/handles/stream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ cdef class UVStream(UVBaseTransport):
self._buffer_size = 0
return

elif err != uv.EAGAIN:
elif err != -4088: # for now, use -4088 directly, instead of uv.EAGAIN (which is equal to 11)
ctx.close()
# print("Something failed in line 519 uv.uv_try_write")
exc = convert_error(err)
Expand Down Expand Up @@ -786,7 +786,7 @@ cdef inline bint __uv_stream_on_read_common(UVStream sc, Loop loop,
sc.__reading_stopped() # Just in case.
return True

if nread == uv.EOF:
if nread == -4095: # for now, use -4095 directly, instead of uv.EOF (which is equal to -1)
# From libuv docs:
# The callee is responsible for stopping closing the stream
# when an error happens by calling uv_read_stop() or uv_close().
Expand Down

0 comments on commit d61f416

Please sign in to comment.