mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-11 09:25:00 +00:00
Update server.py
This commit is contained in:
parent
6e7d1b7d78
commit
c089a8e099
|
@ -451,9 +451,8 @@ def start(): #Main Program
|
|||
sock.bind(('', listening_port))
|
||||
sock.listen(max_connection)
|
||||
print("[*] Server started successfully [ %d ]" %(listening_port))
|
||||
except Exception:
|
||||
print("[*] Unable to Initialize Socket")
|
||||
print(Exception)
|
||||
except Exception as e:
|
||||
print("[*] Unable to Initialize Socket:", str(e))
|
||||
sys.exit(2)
|
||||
|
||||
while True:
|
||||
|
@ -536,6 +535,8 @@ if __name__== "__main__":
|
|||
print("\n[*] User has requested an interrupt")
|
||||
print("[*] Application Exiting.....")
|
||||
sys.exit()
|
||||
except Exception as e:
|
||||
print("[*] Failed to initialize:", str(e))
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--max_conn', help="Maximum allowed connections", default=255, type=int)
|
||||
|
|
Loading…
Reference in New Issue
Block a user