Skip to content

Commit

Permalink
fix deno vless import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zizifn committed Apr 26, 2023
1 parent 9aa1b05 commit cdd3eda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/deno-vless/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { serve } from 'https://deno.land/[email protected]/http/server.ts';
import * as uuid from 'https://jspm.dev/uuid';
import { serveClient } from './client.ts';
import {
closeWebSocket,
safeCloseWebSocket,
delay,
makeReadableWebSocketStream,
processVlessHeader,
Expand Down Expand Up @@ -148,7 +148,7 @@ async function processWebSocket({
error.stack || error
);
// error is cancel readable stream anyway, no need close websocket in here
// closeWebSocket(webSocket);
// safeCloseWebSocket(webSocket);
// close remote conn
// remoteConnection?.close();
});
Expand Down Expand Up @@ -206,7 +206,7 @@ async function processWebSocket({
);
},
abort(reason) {
closeWebSocket(webSocket);
safeCloseWebSocket(webSocket);
console.error(
`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`,
reason
Expand All @@ -219,7 +219,7 @@ async function processWebSocket({
`[${address}:${portWithRandomLog}] processWebSocket has exception `,
error.stack || error
);
closeWebSocket(webSocket);
safeCloseWebSocket(webSocket);
}
return;
}
Expand Down

0 comments on commit cdd3eda

Please sign in to comment.