Minor grooming.
This commit is contained in:
parent
f2edaa5301
commit
b76701a275
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user