Skip to content

Commit 82fc917

Browse files
committed
Inline TcpForwarder.connect
1 parent a7493d0 commit 82fc917

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

typedb/localstack_typedb/utils/h2_proxy.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ class TcpForwarder:
3434
def __init__(self, port: int, host: str = "localhost"):
3535
self.port = port
3636
self.host = host
37-
self._socket = None
38-
self.connect()
39-
40-
def connect(self):
41-
if not self._socket:
42-
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
43-
self._socket.connect((self.host, self.port))
37+
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
38+
self._socket.connect((self.host, self.port))
4439

4540
def receive_loop(self, callback):
4641
while True:

0 commit comments

Comments
 (0)