Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
peer: provide better debug for queued nil messages
If the doneChan is nil, the nil message can be safely ignored. However, this is still a bug in the caller, so a warning with stacktrace is logged. If the doneChan is non-nil, panicing is the only reasonable option to prevent the program continuing on in an unknown state. The peer code would already panic previously in wire.WriteMessageN for many queued message types, and introducing a new panic call here should not introduce any new crashes that would not have occurred before.
- Loading branch information