Skip to content

Commit

Permalink
[feature] Allow the use of a custom parser (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Feb 20, 2017
1 parent 4322cf2 commit 2dcc794
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manager.js
Expand Up @@ -62,8 +62,9 @@ function Manager (uri, opts) {
this.lastPing = null;
this.encoding = false;
this.packetBuffer = [];
this.encoder = new parser.Encoder();
this.decoder = new parser.Decoder();
var _parser = opts.parser || parser;
this.encoder = new _parser.Encoder();
this.decoder = new _parser.Decoder();
this.autoConnect = opts.autoConnect !== false;
if (this.autoConnect) this.open();
}
Expand Down

0 comments on commit 2dcc794

Please sign in to comment.