Skip to content

Commit 3e45d72

Browse files
committed
Fix synchronous socket pending
1 parent 2af8299 commit 3e45d72

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pymongo/network_layer.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ async def _async_socket_receive(
294294

295295
def wait_for_read(conn: Connection, deadline: Optional[float]) -> None:
296296
"""Block until at least one byte is read, or a timeout, or a cancel."""
297-
sock = conn.conn
297+
sock = conn.conn.sock
298298
timed_out = False
299299
# Check if the connection's socket has been manually closed
300300
if sock.fileno() == -1:
@@ -461,9 +461,6 @@ def sock(self) -> Union[socket.socket, _sslConn]:
461461
def fileno(self) -> int:
462462
return self.conn.fileno()
463463

464-
def pending(self) -> int:
465-
return self.conn.pending()
466-
467464
def recv_into(self, buffer: bytes) -> int:
468465
return self.conn.recv_into(buffer)
469466

0 commit comments

Comments
 (0)