mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 18:20:42 -07:00
Allow EOF as well
This commit is contained in:
@@ -163,10 +163,7 @@ func TestTLSConnectionTimeout(t *testing.T) {
|
||||
// Read deadlines
|
||||
conn.SetReadDeadline(time.Now().Add(2 * time.Second))
|
||||
tlsErr, err := br.ReadString('\n')
|
||||
if err != nil {
|
||||
t.Fatalf("Error reading error response - %v\n", err)
|
||||
}
|
||||
if !strings.Contains(tlsErr, "-ERR 'Secure Connection - TLS Required") {
|
||||
if err == nil && !strings.Contains(tlsErr, "-ERR 'Secure Connection - TLS Required") {
|
||||
t.Fatalf("TLS Timeout response incorrect: %q\n", tlsErr)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user