Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Catch http exception on server start #733

Merged
merged 5 commits into from
Apr 6, 2018
Merged

Catch http exception on server start #733

merged 5 commits into from
Apr 6, 2018

Conversation

martin-doyle
Copy link
Contributor

Unfortunately, #731 only caught the MQTT server errors. For the HTTP server there is an additional change necessary. A unit test is provided.

});
it('should get HTTP port Error: listen EADDRINUSE', function (done) {
this.timeout(10000); // have to wait for the inject with delay of two seconds
instance = new mosca.Server(moscaSettings(), function (err, server) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add an assertion that checks that err is null or undefined? Also in all other cases.

@martin-doyle
Copy link
Contributor Author

martin-doyle commented Mar 25, 2018 via email

@martin-doyle
Copy link
Contributor Author

CI tests failed but for other reasons.

@mcollina mcollina merged commit f3deb5d into moscajs:master Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants