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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user