Enigma crashes trying to write to a node when that node disconnected #324
* Don't attempt to write to non-writable socket!
This commit is contained in:
parent
d1b97f04ff
commit
b377d91155
|
@ -160,7 +160,7 @@ ClientTerminal.prototype.write = function(s, convertLineFeeds, cb) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ClientTerminal.prototype.rawWrite = function(s, cb) {
|
ClientTerminal.prototype.rawWrite = function(s, cb) {
|
||||||
if(this.output) {
|
if(this.output && this.output.writable) {
|
||||||
this.output.write(s, err => {
|
this.output.write(s, err => {
|
||||||
if(cb) {
|
if(cb) {
|
||||||
return cb(err);
|
return cb(err);
|
||||||
|
|
Loading…
Reference in New Issue