Skip to content

Commit a54775a

Browse files
authored
Merge pull request #53 from openziti/match-create_connection-args
make sure `create_ziti_connection()` matches `socket.create_connection()`
2 parents 04540e9 + f563dcd commit a54775a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/openziti/zitisock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def process_bindings(orig):
3030
port = 0
3131
val = orig[k]
3232
if isinstance(k, tuple):
33-
host,port = k
33+
host, port = k
3434
elif isinstance(k, str):
3535
l = k.split(':')
3636
if len(l) == 1:
@@ -46,7 +46,6 @@ def process_bindings(orig):
4646
return bindings
4747

4848

49-
5049
class ZitiSocket(PySocket):
5150
# pylint: disable=redefined-builtin
5251
def __init__(self, af=-1, type=-1, proto=-1, fileno=None, opts=None):
@@ -127,7 +126,8 @@ def setsockopt(self, __level: int, __optname: int, __value: Union[int, bytes]) -
127126
pass
128127

129128

130-
def create_ziti_connection(address, **_):
129+
def create_ziti_connection(address, timeout=None,
130+
source_address=None, *, all_errors=False):
131131
sock = ZitiSocket(socket.SOCK_STREAM)
132132
sock.connect(address)
133133
return sock

0 commit comments

Comments
 (0)