forked from nats-io/nats-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Shutdown stops http server when started manually
In case one creates a server instance with New() and then starts the http server manually (s.StartHTTPMonitoring()), calling s.Shutdown() would not stop the http server because Shutdown() would return without doing anything if `running` was not true. This boolean was set to true only in `s.Start()`. Also added StartMonitoring() to perform the options check and selectively start http or https server to replace individual calls. This is useful for NATS Streaming server that will now be able to call s.StartMonitoring() without having to duplicate code about options checks and http server code. This is related to PR nats-io#481
- Loading branch information
Showing
3 changed files
with
77 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters