Skip to content

Conversation

scottinet
Copy link
Contributor

Now checks the connection close event code and calls the onError listeners instead of the onDisconnect ones when appropriate.

@scottinet scottinet changed the base branch from master to develop September 8, 2016 09:43
@codecov-io
Copy link

codecov-io commented Sep 8, 2016

Current coverage is 100% (diff: 100%)

Merging #111 into develop will not change coverage

@@           develop   #111   diff @@
=====================================
  Files           15     15          
  Lines         1522   1532    +10   
  Methods        258    260     +2   
  Messages         0      0          
  Branches       393    395     +2   
=====================================
+ Hits          1522   1532    +10   
  Misses           0      0          
  Partials         0      0          

Powered by Codecov. Last update 3fd4c2b...1378053

* @param {number} reconnectionDelay
* @param {string|Object} message
*/
function onClientError(autoReconnect, reconnectionDelay, message) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it possible to factorize a little bit the code btw. wsbrowsers.js and wsnode.js ?
(as far as I can see, only the code of this.connect() method has some differences in its syntax)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be, I separated the two wrappers because I initially thought that there would be more differences than that.

Right now the biggest problem is with webpack, when it tries to package ws and other modules that are incompatible with web browsers (crypto and bufferutil).
The only solution I found was to exclude wsnode.js from webpack's analysis. We need to find some way to factorize wsnode and wsbrowsers while preventing webpack to include these modules.

@ballinette
Copy link

+1

@scottinet scottinet merged commit 8869fa5 into develop Sep 19, 2016
@scottinet scottinet deleted the fix-rc7-110-handle-ws-error branch September 19, 2016 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants