Update server.py

This commit is contained in:
Namhyeon Go 2024-02-18 13:20:14 +09:00 committed by GitHub
parent 3183daf103
commit 106c41671d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ import json
import ssl
import time
import re
import resource
import traceback
from subprocess import Popen, PIPE
from datetime import datetime
@ -47,6 +48,11 @@ args = parser.parse_args()
max_connection = args.max_conn
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
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)