Open gregbellingham opened 7 years ago
@Shimi - I have a branch that fixes this, provided you would be open to allowing a git push and a pull request. No authorization at present.
@gregbellingham I see why there is a confusion, the call back in teh code s provided for error handling and not for the write function. Can you create a pull request for the change?
When supplying a callback to the write function, the callback is only fired when an exception is caught. The issue lies with the call to socket.write on line 64:
this.socket.write(lines)
, to which additional parameters should be supplied:this.socket.write(lines, this.encoding, callback)
. This modification will ensure that completion of the socket write also fires the callback.