Tectu / malloy

A cross-platform C++20 library providing embeddable server & client components for HTTP and WebSocket.
BSD 3-Clause "New" or "Revised" License
68 stars 8 forks source link

fix: websockets timing out after 30 seconds #72

Closed 0x00002a closed 3 years ago

0x00002a commented 3 years ago

See: https://github.com/Tectu/malloy/issues/71#issuecomment-881659028 for a long winded explanation. Basically this patch fixes a 30 second timeout being set on the asio level socket that is never changed and which causes a hard timeout for reads to it (with the result that websocket connections timeout after 30 seconds and beasts built-in mechanism to avoid this is never hit).

I've tested the server side and confirmed it fixes the timeout issues I was experiencing. I have done some basic testing of the clientside. I didn't encounter this bug on the clientside (as I don't really use it) but based on the code in connect (which sets a timeout that is never reset), I'm guessing it also had it.

Ref: #71