On 09/06/2024 01:08, Flaviu Tamas wrote:
I'm writing some tests for my Spring Boot application, which uses
tomcat-embed-websocket-10.1.18. When I send a message to the socket
from handleVideoFrame, all I see is
.WebSocketAnnotationMethodMessageHandler : Invoking
VideoStreamController#handleVideoFrame[3 args]
o.s.w.s.m.SubProtocolWebSocketHandler : Clearing session
3b7fc290-eeb3-a86c-a465-8826819f3bde
I can turn debug logging on for org.apache.tomcat.websocket.WsSession,
which give me a bit more detail, but this is detail that the
application user is unlikely to care about (some sort of internal ID
that I don't think is exposed anywhere else)
.WebSocketAnnotationMethodMessageHandler : Invoking
VideoStreamController#handleVideoFrame[3 args]
org.apache.tomcat.websocket.WsSession : Closing WebSocket session [3]
o.s.w.s.m.SubProtocolWebSocketHandler : Clearing session
a77dcddd-877e-1d5a-8dd2-daf3f38395f7
This is especially frustrating because this log line has complete
context. If I place a breakpoint in WsSession.doClose, I can see that
the error is "The decoded text message was too big for the output
buffer and the endpoint does not support partial messages", which does
help me solve my problem.
It would be nice if this message was exposed to the user, either by
default, or at the very least in the debug logs.
The message is sent to the user/client as part of the WebSocket close
message. If the client doesn't expose that to the user, there isn't much
Tomcat can do.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org