Update server.py
Some checks are pending
Check syntax / check (push) Waiting to run
Some checks are pending
Check syntax / check (push) Waiting to run
This commit is contained in:
parent
bbf868c1de
commit
3b59cbea41
1 changed files with 11 additions and 11 deletions
|
@ -604,10 +604,10 @@ def tcp_session(sock):
|
||||||
print("Something went wrong...")
|
print("Something went wrong...")
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
def ssl_session(sock2):
|
def ssl_session(sock2):
|
||||||
|
with context.wrap_socket(sock2, server_side=True) as sock:
|
||||||
try:
|
try:
|
||||||
while opened:
|
while opened:
|
||||||
print("Waiting for connection...")
|
print("Waiting for connection...")
|
||||||
with context.wrap_socket(sock, server_side=True) as sock:
|
|
||||||
connection, client = sock.accept()
|
connection, client = sock.accept()
|
||||||
ip_to = restrict_ip
|
ip_to = restrict_ip
|
||||||
threading.Thread(target=session, daemon=True, args=[connection, client, ip_to]).start()
|
threading.Thread(target=session, daemon=True, args=[connection, client, ip_to]).start()
|
||||||
|
|
Loading…
Reference in a new issue