Skip to content

Commit

Permalink
Merge pull request #3 from telerik/milanov/use-new-buffer
Browse files Browse the repository at this point in the history
Use new Buffer()
  • Loading branch information
TsvetanMilanov committed Feb 14, 2017
2 parents 6b42671 + 89a5dad commit 63dedc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios-device-lib-stdio-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const HeaderSize = 4;
class IOSDeviceLibStdioHandler extends EventEmitter {
constructor() {
super();
this._unfinishedMessage = Buffer.alloc(0);
this._unfinishedMessage = new Buffer(0);
}

startReadingData() {
Expand Down Expand Up @@ -83,7 +83,7 @@ class IOSDeviceLibStdioHandler extends EventEmitter {
const concatenatedMessage = Buffer.concat([this._unfinishedMessage, data]);

// Clear the unfinished message buffer.
this._unfinishedMessage = Buffer.alloc(0);
this._unfinishedMessage = new Buffer(0);
this._unpackMessages(concatenatedMessage);
} else {
// While debugging the data here contains one character - \0, null or 0.
Expand Down

0 comments on commit 63dedc4

Please sign in to comment.