-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unwraps in network code #37
Comments
Comment by crepererum Apart from it, I can happily report that librespot runs perfectly on a ODROID-C2, which is an AArch64 platform 😃 |
Comment by plietar Yeah, I wrote librespot while I was still reverse engineering the protocol, so these issues weren't really my priority. There's a lot of things I'm not too happy with in the code, including this, but I don't really have much time to work on it. One day though ... Glad to hear it still works 😄 |
Comment by plietar FYI, I'm working on a (partial) rewrite which should be much better at handling network issues |
Comment by joerg-krause I am getting the "Connection reset by peer", too. Any idea why the connection is reset? How can the panic be handled properly? |
Comment by crepererum I guess the reset means that either the Spotify server directly or some node in between cuts the TCP connection. This ain't uncommon, expecially when the server suffers under high loads. Network problems are (IMHO) such normal that they shouldn't produce a panic. But as @plietar already mentioned, proof of concept code does hit always follow this rule. |
Please see #103 for more on this issue. |
Issue by crepererum
Saturday Nov 12, 2016 at 17:32 GMT
Originally opened as plietar/librespot#127
The network-related code (e.g. in
session.rs
) uses unwrap, even in places where failure is kinda likely. For example:Connection resets are a normal thing, esp. in Wifi-environments. So the
recv
method should probably return a Result-type instead and the layer above (poll
) should handle failed connection attempts, e.g. by reconnect/retry.The text was updated successfully, but these errors were encountered: