Skip to content

Commit

Permalink
we should not just timeout when there is a debugging session
Browse files Browse the repository at this point in the history
move the client.settimeout back to the socket

fixes #484

Signed-off-by: BlackEagle <[email protected]>
  • Loading branch information
BlackIkeEagle committed Sep 29, 2020
1 parent 1f3ba27 commit d54b80e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python3/vdebug/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ async def run_async(self):
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((self.__host, self.__port))
s.listen(5)
s.settimeout(5)
while 1:
try:
# using ensure_future here since before 3.7, this is not a coroutine, but returns a future
self.__socket_task = asyncio.ensure_future(self.__loop.sock_accept(s))
client, address = await self.__socket_task
# set resulting socket to blocking
client.setblocking(True)
client.settimeout(5)

self.log("Found client, %s" % str(address))
self.__output_q.put((client, address))
Expand Down

0 comments on commit d54b80e

Please sign in to comment.