mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[FIXED] Monitoring: tls configuration not updated on reload
When creating the http server, we need to provide a TLS configuration. After a config reload, the new TLS config would not be reflected. We had the same issue with Websocket and was fixed with the use of tls.Config.GetConfigForClient API, which makes the TLS handshake to ask for a TLS config. That fix for websocket was simply not applied to the HTTPs monitoring case. I have also fixed some flappers due to the use of localhost instead of 127.0.0.1 (connections possibly would resolve to some IPv6 address that the server would not accept, etc..) Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -2366,6 +2366,10 @@ func TestWSHandshakeTimeout(t *testing.T) {
|
||||
// Check that server logs error
|
||||
select {
|
||||
case e := <-logger.errCh:
|
||||
// Check that log starts with "websocket: "
|
||||
if !strings.HasPrefix(e, "websocket: ") {
|
||||
t.Fatalf("Wrong log line start: %s", e)
|
||||
}
|
||||
if !strings.Contains(e, "timeout") {
|
||||
t.Fatalf("Unexpected error: %v", e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user