mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-06 15:05:00 +00:00
Update server.py
This commit is contained in:
parent
d6492b7389
commit
4e2aeb0fa7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user