Cloudflare DevelopersCD
Cloudflare Developersโ€ข2y agoโ€ข
2 replies
Kitodi

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.
import { connect } from 'cloudflare:sockets'

connect(...).socket.readable.getReader().read()
Was this page helpful?