Skip to content

Commit

Permalink
Small issue in errors.pyx seems resolved.
Browse files Browse the repository at this point in the history
Skipping uverr == uv.UV_ECANCELED test no longer needed. Also drop spurious WIN32_LEAN_AND_MEAN define.
  • Loading branch information
lschoe committed Jul 7, 2024
1 parent 2bc04e3 commit f1b492f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 2 additions & 6 deletions winloop/errors.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,8 @@ cdef int __convert_socket_error(int uverr):
cdef convert_error(int uverr):
cdef int sock_err

# Winloop comment: The next two lines are used in uvloop:
# if uverr == uv.UV_ECANCELED:
# return aio_CancelledError()
# Deleting these lines needed to pass test_aiohttp_graceful_shutdown (test_aiohttp.Test_AIO_AioHTTP)
# And deleting these lines does not seem to cause any other issues on Windows.
# TODO: find out why these lines are needed on Linux?
if uverr == uv.UV_ECANCELED:
return aio_CancelledError()

sock_err = __convert_socket_error(uverr)
if sock_err:
Expand Down
3 changes: 0 additions & 3 deletions winloop/includes/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#include <arpa/inet.h>
#include <unistd.h>
#else
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <io.h>
#include <winsock2.h>
#endif
Expand Down

0 comments on commit f1b492f

Please sign in to comment.