socketcluster-server icon indicating copy to clipboard operation
socketcluster-server copied to clipboard

server options aren't passed correctly on server.js

Open KaniZ0r opened this issue 5 years ago • 1 comments

Current behaviour

Server options are passed as options parameter to server.js. They are combinet to let opts variable via Object.assign and stored to this.options. Server.js takes options from let opts instead of this.options and this causes many options to be null.

Expected behaviour

Server.js takes options from this.options which contains combined options from let opts and optionsparameter.

KaniZ0r avatar Feb 04 '20 12:02 KaniZ0r

@KaniZ0r This shouldn't be a problem because Object.assign mutates the original opts object. So this.options === opts. That said, we can modify the original code to make this more clear. If that's the case, then this is not very high priority but feel free to make a PR.

Did you notice any problems when running the node? Could there be an alternative explanation?

jondubois avatar Feb 04 '20 12:02 jondubois