Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow read empty socket in nonblocking mode on win32 #79

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions aprslib/inet.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import select
import time
import logging
import sys

from aprslib import __version__, string_type, is_py3
from aprslib.parsing import parse
Expand Down Expand Up @@ -338,6 +339,10 @@ def _socket_readlines(self, blocking=False):
and not blocking
and len(self.buf) == 0):
break
elif ("WinError 10035" in str(e)
and not blocking
and "win32" in sys.platform):
break
else:
self.logger.error("socket error on recv(): %s" % str(e))

Expand Down