Obsolete
/
ipcd
Archived
3
0
Fork 0

websocketd: replace warnings with debug (for example: ping/pong messages)

master
Karchnu 2020-08-31 05:04:00 +02:00
parent fca1b29a47
commit 4ae93338a5
1 changed files with 6 additions and 6 deletions

View File

@ -306,7 +306,7 @@ def websocket_switching_procedure (activefd : Int)
still_something_to_read = ! wsclient.ws.io.empty?
if wsclient.closed?
Baguette::Log.error "client #{activefd} is closed"
Baguette::Log.error "client #{activefd} is closing"
Context.context.remove_fd activefd
return
end
@ -323,21 +323,21 @@ def websocket_switching_procedure (activefd : Int)
Context.context.remove_fd activefd
return
when WebSocket::Ping
Baguette::Log.warning "Received a ping message"
Baguette::Log.debug "Received a ping message"
if still_something_to_read
Baguette::Log.info "Still something to read"
next
end
break
when WebSocket::Pong
Baguette::Log.warning "Received a pong message"
Baguette::Log.debug "Received a pong message"
if still_something_to_read
Baguette::Log.info "Still something to read"
next
end
break
when WebSocket::Close
Baguette::Log.warning "Received a close message"
Baguette::Log.debug "Received a close message"
Context.context.remove_fd activefd
if still_something_to_read
Baguette::Log.info "Still something to read"
@ -345,7 +345,7 @@ def websocket_switching_procedure (activefd : Int)
end
return
when WebSocket::NotFinal
Baguette::Log.warning "Received only part of a message"
Baguette::Log.warning "Received only part of a message (not supported)"
if still_something_to_read
Baguette::Log.info "Still something to read"
next
@ -354,7 +354,7 @@ def websocket_switching_procedure (activefd : Int)
when Bytes
# TODO: when receiving a binary message
# we should test the format and maybe its content
Baguette::Log.warning "Received a binary message"
Baguette::Log.warning "Received a binary message (not supported)"
if still_something_to_read
Baguette::Log.info "Still something to read"
next