Closed ddaggHT closed 11 months ago
@ddaggHT Do you mind sharing the type and value (t
and err
) from t := err.(type)
that cause the loop/panic?
Hi @ddaggHT yeah I'm not sure I quite follow this. Could you provide a reproduction?
If it's an error that has to return early, we should put it in its own case clause like the error above.
I'd rather defer unknown errors because I think it's easier finding all the errors we have to return early from versus all the ones we're safe to continue from, e.g. if the message is invalid JSON for some reason.
I added additional checks to return early here on websocket.ErrCloseSent
:
I ran into panic: repeated read on failed websocket connection
for concurrent clients often after I upgraded gorilla/websocket to v1.5.1 in https://github.com/andreykaipov/goobs/pull/64. Oddly enough I wasn't able to reproduce it at all with gorilla/websocket v1.5.0, but I also don't see any relevant changes between the two versions, so I wonder if this is the same panic you ran into too.
If it isn't please open up a new issue with the details!
Hey @andreykaipov yes that is the same issue, sorry I've been away. Looking at PR #80 that should do some good 🙂
whenever there is an error technically need to return, if we don't can get caught in a loop and have gorilla WebSockets library panic.