Skip to content

Commit 4328ca1

Browse files
Allow multiple start/stop (#29)
1 parent 88f5d9d commit 4328ca1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/zmq_anyio/_socket.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ async def start(
860860
task_status: TaskStatus[None] = TASK_STATUS_IGNORED,
861861
) -> None:
862862
if self._starting:
863+
task_status.started()
863864
return
864865

865866
self._starting = True
@@ -879,6 +880,7 @@ async def start(
879880
async def _start(self, *, task_status: TaskStatus[None] = TASK_STATUS_IGNORED):
880881
assert self.started is not None
881882
if self.started.is_set():
883+
task_status.started()
882884
return
883885

884886
assert self.started is not None
@@ -922,6 +924,7 @@ async def _start(self, *, task_status: TaskStatus[None] = TASK_STATUS_IGNORED):
922924
async def stop(self):
923925
assert self._exited is not None
924926
assert self.stopped is not None
927+
925928
self.stopped.set()
926929
try:
927930
await self._exited.wait()

0 commit comments

Comments
 (0)