kopia lustrzana https://github.com/c9/core
fix bridge-service crashing vfs-worker on windows
rodzic
eb710ca024
commit
d41562a5ac
|
@ -21,7 +21,7 @@ module.exports = function (vfs, options, register) {
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("error", function(err) {
|
client.on("error", function(err) {
|
||||||
if (err.code == "ECONNREFUSED") {
|
if (err.code == "ECONNREFUSED" && process.platform !== "win32") {
|
||||||
require("fs").unlink(SOCKET, function() {
|
require("fs").unlink(SOCKET, function() {
|
||||||
createListenServer(api);
|
createListenServer(api);
|
||||||
});
|
});
|
||||||
|
@ -30,7 +30,7 @@ module.exports = function (vfs, options, register) {
|
||||||
createListenServer(api);
|
createListenServer(api);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
api.onError(err);
|
api.onConnectError(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("end", function() {
|
client.on("end", function() {
|
||||||
|
@ -101,7 +101,7 @@ module.exports = function (vfs, options, register) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
api.onError(err);
|
api.onConnectError(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
api.disconnect = function() {
|
api.disconnect = function() {
|
||||||
|
@ -134,8 +134,8 @@ module.exports = function (vfs, options, register) {
|
||||||
onData: function(data) {
|
onData: function(data) {
|
||||||
stream && stream.emit("data", data);
|
stream && stream.emit("data", data);
|
||||||
},
|
},
|
||||||
onError: function(err) {
|
onConnectError: function(err) {
|
||||||
stream && stream.emit("error", err);
|
callback(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue