MCPcopy Create free account
hub / github.com/Ptechgithub/configs / retry

Function retry

worker.js:295–303  ·  view source on GitHub ↗

* Retries connecting to the remote address and port if the Cloudflare socket has no incoming data. * @returns {Promise } A Promise that resolves when the retry is complete.

()

Source from the content-addressed store, hash-verified

293 * @returns {Promise<void>} A Promise that resolves when the retry is complete.
294 */
295 async function retry() {
296 const tcpSocket = await connectAndWrite(proxyIP || addressRemote, portRemote)
297 tcpSocket.closed.catch(error => {
298 console.log('retry tcpSocket closed error', error);
299 }).finally(() => {
300 safeCloseWebSocket(webSocket);
301 })
302 remoteSocketToWS(tcpSocket, webSocket, vlessResponseHeader, null, log);
303 }
304
305 const tcpSocket = await connectAndWrite(addressRemote, portRemote);
306

Callers 1

remoteSocketToWSFunction · 0.85

Calls 3

connectAndWriteFunction · 0.85
safeCloseWebSocketFunction · 0.85
remoteSocketToWSFunction · 0.85

Tested by

no test coverage detected