3
0

Minor grooming.

This commit is contained in:
Karchnu 2020-12-02 18:53:02 +01:00
parent f2edaa5301
commit b76701a275

View File

@ -504,14 +504,14 @@ def websocket_switching_procedure (activefd : Int)
serv = Context.context.fd_to_ipcclient[activefd]
message = serv.read
if Context.context.is_json[fdclient]
buf = message.to_json
print_message buf, activefd
buf = if Context.context.is_json[fdclient]
message.to_json
else # We assume that non-JSON clients are CBOR clients.
buf = message.to_cbor
print_message buf, activefd
message.to_cbor
end
print_message buf, activefd
wsclient.send buf
end
rescue e