mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-09-06 09:51:06 +00:00
Update server.py
This commit is contained in:
parent
3183daf103
commit
106c41671d
|
@ -14,6 +14,7 @@ import json
|
||||||
import ssl
|
import ssl
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
|
import resource
|
||||||
import traceback
|
import traceback
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -47,6 +48,11 @@ args = parser.parse_args()
|
||||||
max_connection = args.max_conn
|
max_connection = args.max_conn
|
||||||
buffer_size = args.buffer_size
|
buffer_size = args.buffer_size
|
||||||
|
|
||||||
|
# https://stackoverflow.com/questions/25475906/set-ulimit-c-from-outside-shell
|
||||||
|
resource.setrlimit(
|
||||||
|
resource.RLIMIT_CORE,
|
||||||
|
(resource.RLIM_INFINITY, resource.RLIM_INFINITY))
|
||||||
|
|
||||||
def start(): #Main Program
|
def start(): #Main Program
|
||||||
try:
|
try:
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user