I have this code:
module.exports = {
test: function(req, res) {
Model.create({...}).exec(function (err, created) {
if(err) { ... }
sails.sockets.broadcast('abc', 'abc', created);
return res.json({ ... });
});
}
};
And I get RangeError: Maximum call stack size exceededthrown in/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Parser.js:82
When I delete a line sails.sockets.broadcast(...), it does not crash.
It was not clear to me how I could find which line caused the error. Even with the team node-debug.
Is this a bug in sails.js? How can I fix this problem?
source
share