Skip to content

Commit

Permalink
Merge pull request #53 from openziti/match-create_connection-args
Browse files Browse the repository at this point in the history
make sure `create_ziti_connection()` matches `socket.create_connection()`
  • Loading branch information
ekoby authored Sep 22, 2023
2 parents 04540e9 + f563dcd commit a54775a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openziti/zitisock.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def process_bindings(orig):
port = 0
val = orig[k]
if isinstance(k, tuple):
host,port = k
host, port = k
elif isinstance(k, str):
l = k.split(':')
if len(l) == 1:
Expand All @@ -46,7 +46,6 @@ def process_bindings(orig):
return bindings



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


def create_ziti_connection(address, **_):
def create_ziti_connection(address, timeout=None,
source_address=None, *, all_errors=False):
sock = ZitiSocket(socket.SOCK_STREAM)
sock.connect(address)
return sock
Expand Down

0 comments on commit a54775a

Please sign in to comment.