TCP Sockets read() function got stuck
Is there a way to handle the timeout when using TCP sockets? When this is called and the server has no response, the Cloudflare Worker get stuck at the
read()
function. Not confirmed in production, it might also get stuck there.
2 Replies
Similar use case when I do write and expected to receive a response, you do the
write()
first then read()
but when try to call again the read()
it will get stuck.
Created GitHub issue in case if this is a bug or it is intended and needed more action to prevent this happening.
https://github.com/cloudflare/workers-sdk/issues/4882
GitHub
🐛 BUG: TCP Stream read() function gets stuck · Issue #4882 · cloudf...
Which Cloudflare product(s) does this pertain to? Workers for Platforms, Workers Runtime What version(s) of the tool(s) are you using? 3.18.0 [Wrangler] What version of Node are you using? v20.11.0...