Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Oct 5, 2024
1 parent 23cd4b7 commit 4f0a1cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ module.exports = class WebSocketServer extends EventEmitter {
open: (ws) => {
ws.client = new this.options.WebSocket(ws, ws.req, this);
if(this.clients) this.clients.add(ws.client);
if(onOpen) {
onOpen(ws.client, ws.req);
if(ws.onOpen) {
ws.onOpen(ws.client, ws.req);
} else {
this.emit("connection", ws.client, ws.req);
}
Expand Down

0 comments on commit 4f0a1cc

Please sign in to comment.