aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
525 stars 100 forks source link

Broken pipe while attempting to get stream's next message. #241

Closed Xithrius closed 1 year ago

Xithrius commented 2 years ago

I seem to be having an issue where I'll get an error of Io(OS { code: 32, kind: BrokenPipe, message: "Broken pipe" }) at (1) (tx.send() also gives the prepended string, but I didn't include that here for simplicity's sake, so the error above actually originates from err in (3)).

The match statement starts at (2), and the error is caught at (3), which also contains the previously mentioned (1).

I have attempted to resolve this by disconnecting and reconnecting, and also overwriting the stream variable at (2) with a new one, but both options give the same result. I realize at this current time that quitting a channel that couldn't be connected to in the first place isn't needed, and will be removed. For now it will remain, for I have confirmed that it isn't causing the problem at hand.

  1. https://github.com/Xithrius/twitch-tui/blob/bbaadf7cfcc0478a5cae4cf8926b85a35d86877c/src/twitch.rs#L207
  2. https://github.com/Xithrius/twitch-tui/blob/bbaadf7cfcc0478a5cae4cf8926b85a35d86877c/src/twitch.rs#L99
  3. https://github.com/Xithrius/twitch-tui/blob/bbaadf7cfcc0478a5cae4cf8926b85a35d86877c/src/twitch.rs#L201-L218
Xithrius commented 1 year ago

Problem no longer occurs.