We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2260e0a commit 0ade30dCopy full SHA for 0ade30d
src/zmq_anyio/_socket.py
@@ -194,6 +194,12 @@ def __init__(
194
self._task_group = task_group
195
self.__stack = None
196
197
+ def fileno(self) -> int:
198
+ try:
199
+ return super().fileno()
200
+ except zmq.error.ZMQError:
201
+ return -1
202
+
203
def get(self, key):
204
result = super().get(key)
205
if key == EVENTS:
tests/test_socket.py
@@ -341,8 +341,12 @@ async def test_close(create_bound_pair):
341
async with create_task_group() as tg:
342
await tg.start(a.start)
343
await tg.start(b.start)
344
+ print(f"{a.fileno()=}")
345
+ print(f"{b.fileno()=}")
346
a.close()
347
b.close()
348
349
350
await sleep(0.1)
351
352
0 commit comments