tokio-tower: Does receiving a multiplexed response with a bad response identifier cause a panic?

Reading the multiplexed client implementation, it looks like a response with an unknown response identifier will cause a panic, due to the use of expect.

https://github.com/tower-rs/tokio-tower/blob/fe6fd0c273759ece4e2e9db559f0507b1fcb02e1/src/multiplex/client.rs#L323-L327

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Unfortunately I think this would be a breaking change, since it requires adding a variant to Error. A similar thing can also happen for Pipelined, if you get a response but don’t have a pending request. Both of those should probably map to an error like Error::Desynchronized. I’ll leave this open as a reminder for the next breaking release! I don’t think it’s urgent enough to do a breaking release right now.