New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop with autoreconnect:reuse #186
Comments
Indeed, |
Something like
? Why do you need Also note that |
I was originally thinking of sending frequent batches via cron, or a script loop, and |
I'm not sure if this is intended and I'm just using it wrong, but I ran into what seems like an infinite loop bug due to overlay order (hopefully that's the right terminology, this is my first time using websocat).
Repro:
It never reconnects.
However, if I run the proxy this way, with
reuse
andautoreconnect
flipped, it works mostly as expected:After aborting and restarting the server, the client's events usually get through. Sometimes the first batch of lines I send don't make it (or partially). I suspect this loop is because the overlays just decorate each other, so maybe it makes sense that this fails, but I'm not entirely sure if I should expect the first case to fail so I wrote this up.
I wish there was a way, from a client perspective, to know if events made it or not, so I could know to retry sending them. For example, setting an exit code if it can't connect, but this might be tough with buffering.
My ultimate use case is periodically (e.g. every second or via tail) reading a file, filtering lines, and dumping results to a (real) server. I'd rather not reconnect every second so I was experimenting with reuse/reconnect to act as a pseudo-persistent connection.
The text was updated successfully, but these errors were encountered: