Open kylecombes opened 5 years ago
Never mind, it doesn't fail anymore. This must've been related to another issue I was facing.
OK, the issue came back. It seems that something in the default for fail
is not working. Putting in the following for fail
fixes it, and commenting it out breaks it again:
(data, message, error, accept) => {
if (error) {
throw new Error(message);
} else {
accept(null, false);
}
}
Using deps
and not specifying ~
success
and~fail
, Socket.io breaks entirely without any error for me.The solution for me was to simply copy and paste in the sample code from the README.
It seems as though
accept(err, result)
instead ofaccept()
may be the correct approach for Socket.io >= v2, since that is what it ends up running with the code copied from the README and left unmodified. Just my guess though.