Update server.py

This commit is contained in:
Namhyeon Go 2024-02-26 17:01:23 +09:00 committed by GitHub
parent d6492b7389
commit 4e2aeb0fa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,7 +56,7 @@ parser.add_argument('--buffer_size', help="Number of samples to be used", defaul
args = parser.parse_args()
max_connection = args.max_conn
buffer_size = args.buffer_size
accepted_relay = []
accepted_relay = {}
# https://stackoverflow.com/questions/25475906/set-ulimit-c-from-outside-shell
resource.setrlimit(
@ -153,7 +153,7 @@ def conn_string(conn, data, addr):
else:
jsondata = json.loads(data.decode(client_encoding))
if jsondata['jsonrpc'] == "2.0" and jsondata['method'] == "relay_accept":
accepted_relay.append(conn)
accepted_relay[id] = conn
# parse first data (header)
webserver, port, scheme, method, url = parse_first_data(data)