Totodore / socketioxide

A socket.io server implementation in Rust that integrates with the Tower ecosystem and the Tokio stack.
https://docs.rs/socketioxide
MIT License
1.13k stars 49 forks source link

Unnecessary panic on Message enum match arms #319

Closed ArchangelJTW closed 2 months ago

ArchangelJTW commented 2 months ago

Describe the bug Some of the match arms for tungstenite's Message enum in engineioxide/src/transport/ws.rs line 194 are not done, and therefore panic! I don't think it should panic, because some libraries use the other message variants, for example Pong. The catchall should just log to tracing instead of panicking.

To Reproduce Steps to reproduce the behavior: Try a client (doghappy's C# SocketIOClient) that uses the other message enum variants

Expected behavior Not panicking for no reason

Versions (please complete the following information):

Additional context There is none, thanks

acfsmith commented 2 months ago

I have the same problem with my client application written in Flutter. Apart from frequent panics, Socketioxide works just fine.

Totodore commented 2 months ago

Fixed with v0.13.1. Thanks for the report!