Move out of try, can't realistically fail

This commit is contained in:
Daniel Goldberg 2019-11-27 13:55:39 +02:00
parent 65436ad5d6
commit 1393c88277
1 changed files with 1 additions and 1 deletions

View File

@ -61,8 +61,8 @@ class TcpProxy(TransportProxyBase):
except socket.timeout: except socket.timeout:
continue continue
try:
dest = socket.socket(socket.AF_INET, socket.SOCK_STREAM) dest = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
dest.connect((self.dest_host, self.dest_port)) dest.connect((self.dest_host, self.dest_port))
except socket.error as ex: except socket.error as ex:
source.close() source.close()