Skip to content

Commit b6bf4f0

Browse files
authored
PYTHON-2320 Use select instead of poll on Jython (#466)
1 parent 05267fb commit b6bf4f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymongo/socket_checker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
import errno
1818
import select
19+
import sys
1920

20-
_HAVE_POLL = hasattr(select, "poll")
21+
# PYTHON-2320: Jython does not fully support poll on SSL sockets,
22+
# https://bugs.jython.org/issue2900
23+
_HAVE_POLL = hasattr(select, "poll") and not sys.platform.startswith('java')
2124
_SelectError = getattr(select, "error", OSError)
2225

2326

0 commit comments

Comments
 (0)