From 3973b74ff1909f9089df75dfccb8b62d937bf4fd Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 17 May 2020 06:26:55 -0500 Subject: [PATCH] refactor: open shortcut --- packages/net/server/socket.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/net/server/socket.js b/packages/net/server/socket.js index f5f8a9f..c571eb5 100644 --- a/packages/net/server/socket.js +++ b/packages/net/server/socket.js @@ -10,9 +10,12 @@ const decorateServer = compose( export class SocketServer extends decorateServer(class {}) { - constructor() { + constructor(httpServer) { super(); this.onConnect = this.onConnect.bind(this); + if (httpServer) { + this.open(httpServer); + } } close(fn) {