Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- _r, w = await asyncio.wait_for(asyncio.open_connection(task.ip, task.port),
- task.timeout)
- except (asyncio.TimeoutError, ConnectionRefusedError):
- pass
- else:
- w.close()
- yield task # yield successful tasks
Add Comment
Please, Sign In to add comment