Closed YektaLeblebici closed 3 years ago
Why is this not merged yet? If you have a receiver with a bound handler, this panic gets triggered upon a reset connection. The same does not apply to a bound transceiver, but I haven't looked into why.
This seems like a simple enough fix to merge.
Edit: Maybe because there is a deeper underlying bug? For instance, why does r.cl.Read() not return an error on a reset connection?
In some cases [1] r.cl.Read() returns a nil interface without any errors, leading to panics when the p.Header() (when p == nil) is called.
This change adds a simple check for nil values.
Example:
[1] For example, when the connection is abruptly closed by the server.