sources: bump maximum message size to 64k
These messages contain certificate data, which is quite large. We should probably use streaming sockets in the future.
This commit is contained in:
parent
e123715bc6
commit
12b5c6aaa4
1 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ class SourcesServer:
|
||||||
return {"error": f"source returned malformed json: {r.stdout}"}
|
return {"error": f"source returned malformed json: {r.stdout}"}
|
||||||
|
|
||||||
def _dispatch(self, sock):
|
def _dispatch(self, sock):
|
||||||
msg, addr = sock.recvfrom(8182)
|
msg, addr = sock.recvfrom(65536)
|
||||||
request = json.loads(msg)
|
request = json.loads(msg)
|
||||||
reply = self._run_source(request["source"], request["checksums"])
|
reply = self._run_source(request["source"], request["checksums"])
|
||||||
msg = json.dumps(reply).encode("utf-8")
|
msg = json.dumps(reply).encode("utf-8")
|
||||||
|
|
@ -67,7 +67,7 @@ def get(source, checksums):
|
||||||
"checksums": checksums
|
"checksums": checksums
|
||||||
}
|
}
|
||||||
sock.sendall(json.dumps(msg).encode('utf-8'))
|
sock.sendall(json.dumps(msg).encode('utf-8'))
|
||||||
reply = json.loads(sock.recv(8192))
|
reply = json.loads(sock.recv(65536))
|
||||||
if "error" in reply:
|
if "error" in reply:
|
||||||
raise RuntimeError(f"{source}: " + reply["error"])
|
raise RuntimeError(f"{source}: " + reply["error"])
|
||||||
return reply
|
return reply
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue