Closed staltz closed 5 years ago
Looks good to me
Pinging other people who could help review this: @Happy0 @dominictarr @regular
will the server ever emit errors other than when you are trying to call listen?
@dominictarr I updated the PR to address what you mentioned. I think this PR is now good to merge, but we still would need to talk about having a server.on('error', handler)
for all moments post-initialization, because otherwise this will cause crashes in Manyverse. That is, this PR won't protect us from EINVAL crashes in Manyverse, and I'm still rolling out a fork of multiserver instead.
Actually, correction: my fork of multiserver does not fix the crash, unfortunately. The crash is being tracked also here in nodejs-mobile.
Regardless, this PR seems good to merge.
@regular also reported and fixed this here: https://github.com/ssbc/multiserver-scopes/pull/2
@cryptix no, my PR fixes a cause of an error, this one has a wider scope, adding the ability to handle errors. Bay of plenty, like all Electron apps, I assume, also suffered from this non-handling of listener errors, because that causes an uncaught exception which by default blows up right into the user's face.
merged into 3.6.0
please don't wait for me to merge stuff, this is a pretty straight forward thing, someone please make the call and merge it
I get a lot of reports that Manyverse is crashing, and the errors look like this:
The correct fix for this error (has to do with suffixing the scope_id e.g.
%wlan0
to the IPv6 address) is not in this PR, but anyway, I found that this error is coming from theserver.listen
call inmultiserver/plugins/net
and was surprised that there was no handling of server errors, so this PR adds that, by simply detecting that error and sending it upwards to the startedCb callback, which can belong to thecombined
multiserver.