unsupported protocol header when server sends a new challenge
After running a client for a prolonged period of time (At random in the span of days, not creating new clients), I was getting error "Unsupported protocol header" so I decided to debug and the data variable is ff ff ff ff 41 0b a8 6e 38 when this error is emitted (with last 4 bytes random)
After looking around, this (41) seems to be the challenge header, so it seems like after a long period of a client existing, the server may send a new challenge, but the library is not handling it correctly, and so every new query is just the server replying with new challenges and the library cannot handle it.
My code is available here https://github.com/ynot01/rot-tracker-webhook/blob/main/main.go#L73-L86
I was holding onto clients instead of closing and creating new ones, as closing them was seemingly causing a memory leak, forcing a Go crash from lack of resources (seen in this previous version of the file https://github.com/ynot01/rot-tracker-webhook/blob/66a86922a254585fc111ae4b735811034d17ed93/main.go#L60-L84)