Skip to content

Commit

Permalink
Added error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Sep 22, 2023
1 parent ccc4e09 commit b4b3fd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ function listen(port, ssl) {
WSProxyServer.configure(dss, port);
WSServer.configure(wss);

server.on("error", (error) => {
console.error(error);
})

server.on("upgrade", function upgrade(request, socket, head) {
const pathname = url.parse(request.url).pathname;

Expand All @@ -100,6 +104,7 @@ function listen(port, ssl) {
} else {
console.error("Forwarding further.. " + pathname);
// socket.destroy();
socket.on("error", (error) => console.error(error));
}
});

Expand Down

0 comments on commit b4b3fd2

Please sign in to comment.