Skip to content

Commit

Permalink
[Update] server: condition in accept loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien committed Sep 9, 2024
1 parent 9fa89d0 commit 5ca115a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/py/extra/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ async def Serve(
# TODO: Add condition
try:
while True:
if options.condition and not options.condition():
break
try:
client, _ = await loop.sock_accept(server)
# NOTE: Should do something with the tasks
Expand Down

0 comments on commit 5ca115a

Please sign in to comment.