Commit graph

8 commits

Author SHA1 Message Date
Romain Beaumont
0bd2e559bd
run standard 1.12 --fix 2018-09-24 22:08:11 +02:00
Romain Beaumont
e3e0a26dfe
change codestyle to standard + enforce it with circle ci 2018-05-13 22:50:16 +02:00
Romain Beaumont
79f82afb91
var -> const/let in examples and tests 2017-07-13 14:03:52 +02:00
Romain Beaumont
eb5764e7ab
fix autoversion in online mode.
Explanation:
in this specific case, we were changing the state of the client to hanshaking (in autoVersion.js) before a connection was made (using setSocket), the consequence is the serializer was already piped to the framer when setSocket was called, and setSocket doesn't unpipe before piping. The consequence of that was the framer was piped 2 times, the packet was sent 2 times and the server kicked us.
My solution is piping the serializer to the framer in Client constructor.
Then if the state is changed, it will anyway automatically unpipe before repiping.

Other places correctly unpipe before piping.

Autoversion is now the default in nmp too
2017-07-12 13:07:25 +02:00
deathcap
14e848ab99 Enable strict mode 2016-04-27 16:27:32 -07:00
deathcap
9a68fd6c34 Support options.version==false in createClient() to auto-detect version 2016-01-30 22:53:38 -08:00
deathcap
66e6f4dd0b Update to use compatible sync API (createClient) 2016-01-30 22:16:36 -08:00
deathcap
a53a2977f2 Add dynamic cross-protocol support 2016-01-27 23:28:27 -08:00