MCPcopy Index your code
hub / github.com/Ptechgithub/pp-worker / retry

Function retry

_worker.js:373–381  ·  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

371 * @returns {Promise<void>} A Promise that resolves when the retry is complete.
372 */
373 async function retry() {
374 const tcpSocket = await connectAndWrite(proxyIP || addressRemote, portRemote)
375 tcpSocket.closed.catch(error => {
376 console.log('retry tcpSocket closed error', error);
377 }).finally(() => {
378 safeCloseWebSocket(webSocket);
379 })
380 remoteSocketToWS(tcpSocket, webSocket, vlessResponseHeader, null, log);
381 }
382
383 const tcpSocket = await connectAndWrite(addressRemote, portRemote);
384

Callers 1

remoteSocketToWSFunction · 0.85

Calls 3

connectAndWriteFunction · 0.85
safeCloseWebSocketFunction · 0.85
remoteSocketToWSFunction · 0.85

Tested by

no test coverage detected