vercel/workflow2.5K stars
Bug fix#5172 Time out a stalled events WebSocket handshake
- What was broken
- If a server accepted the connection but never answered the WebSocket upgrade, every event write for that run waited on the handshake with no deadline, until the run reached its maximum duration.
- What the fix did
- The handshake now gets the same deadline as a request. When it runs out, the socket is dropped and the channel is closed, so that write and later ones go over HTTP. Tests cover a server that never answers the upgrade.