未捕获的异常导致Sails JS~0.12.2中的应用程序崩溃

时间:2017-07-20 07:41:19

标签: crash sails.js uncaught-exception

错误是: event.js第160行 未处理的异常。

在utils.js未处理错误后发生此错误 由于错误:写EPROTO 139889615579008:错误:140770FC:SSL例程:SSL23_GET_SERVER_HELLO:未知协议:../ deps / openssl / openssl / ssl / s23_clnt.c:794:

应用程序立即崩溃。

1 个答案:

答案 0 :(得分:0)

function: (req, res, next) {
var domain = require('domain');
var d = domain.create();
d.on('error', function(er) {});
d.add(req);
    d.add(res);
    d.run(function() {
        next();
    });
}

Adding this to a common function used in config/http.js worked.