mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Atomic write to fix error
This commit is contained in:
parent
e4593d51fc
commit
3d4b5ed8b1
@ -147,8 +147,7 @@ class JudgeHandler(SocketServer.StreamRequestHandler):
|
||||
def _send(self, data):
|
||||
data = json.dumps(data, separators=(',', ':'))
|
||||
compress = data.encode('zlib')
|
||||
self.wfile.write(size_pack.pack(len(compress)))
|
||||
self.wfile.write(compress)
|
||||
self.wfile.write(size_pack.pack(len(compress)) + compress)
|
||||
|
||||
def _packet(self, data):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user