Skip to content

Commit 3dc7090

Browse files
committed
undo proxy changes
1 parent 7384aca commit 3dc7090

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/php-wasm/node/src/lib/networking/outbound-ws-to-tcp-proxy.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,8 @@ async function onWsConnect(client: any, request: http.IncomingMessage) {
206206
clientLog("can't resolve " + reqTargetHost + ' due to:', e);
207207
// Send empty binary data to notify requester that connection was
208208
// initiated
209-
setTimeout(() => {
210-
client.send([]);
211-
client.close(3000);
212-
});
209+
client.send([]);
210+
client.close(3000);
213211
return;
214212
}
215213
} else {
@@ -240,12 +238,7 @@ async function onWsConnect(client: any, request: http.IncomingMessage) {
240238
});
241239
target.on('error', function (e: any) {
242240
clientLog('target connection error', e);
243-
setTimeout(() => {
244-
client.send([]);
245-
client.close(3000);
246-
if (target) {
247-
target.end();
248-
}
249-
});
241+
target.end();
242+
client.close(3000);
250243
});
251244
}

0 commit comments

Comments
 (0)