From 12afbd773587dc5560ae7e077222f7a68fddf7d1 Mon Sep 17 00:00:00 2001 From: BlackEagle Date: Tue, 13 Mar 2018 14:15:37 +0100 Subject: [PATCH] make connections blocking, this fixes vdebug not working on mac Signed-off-by: BlackEagle --- pythonx/vdebug/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonx/vdebug/connection.py b/pythonx/vdebug/connection.py index 7c05c305..d50b2354 100644 --- a/pythonx/vdebug/connection.py +++ b/pythonx/vdebug/connection.py @@ -121,7 +121,7 @@ def start(self, host='', port=9000, timeout=30): serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - serv.setblocking(0) + serv.setblocking(1) serv.bind((host, port)) serv.listen(5) self.__sock = self.listen(serv, timeout) @@ -178,7 +178,7 @@ def run(self): self.log("Listening on port %s" % self.__port) try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.setblocking(0) + s.setblocking(1) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((self.__host, self.__port)) s.listen(5)