ClusterWS / ClusterWS-Client-JS

:fire: JavaScript Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js.
MIT License
115 stars 10 forks source link

Disable Log error #45

Open carmas123 opened 6 years ago

carmas123 commented 6 years ago

Submitting

Please can you add an option to disable the logging into console?

goriunov commented 6 years ago

To be bale to disable errors to the console you will need to catch them with on('error', () => {}) and/or try, catch other vise it is standard of the browsers (not implemented in to the clusterws).

carmas123 commented 6 years ago

I trace the log exception and I found that the message is created at: this.websocket = new Socket(this.options.url), this.websocket.binaryType = "arraybuffer",

This must be into a try {} catch {} to be able to handle the exception

carmas123 commented 6 years ago

Otherwise I got always a browser log

goriunov commented 6 years ago

Ok i will have a look at that. Probably will improve error handling.

goriunov commented 5 years ago

Will go with version 4.0

carmas123 commented 5 years ago

Very good news 👍