Only forward text frames to callbacks#15
Conversation
- Ignore other websocket frames like ping, {ping, Data} ...
- Log when ignoring unexpected frames
|
Note that cowboy will automatically respond for the ping frames, hence the empty return value in that case. |
|
Sorry for being super slow on this one! 🙇 I think a better fix would be to ignore the other frames in |
|
That is for sure also a way to go. Since |
|
Do you want to make those changes, or can I take your commit and add upon it? |
|
Sorry for the late response, it's been very busy weeks. Feel free to add upon the changes here. |
Ignore other websocket frames like ping, {ping, Data} ...
Log when ignoring unexpected frames
Kraft websocket handlers
kraft_ws_jsonrpcandkraft_ws_jsononly handle text frames. This led to function clause errors in our project where we usedkraft_ws_jsonrpcand got{ping, binary()}frames in. This PR fixes it by only forwarding the text frames to the kraft websocket handler.