1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

logging: Actually honor the SoftStart parameter

This commit is contained in:
Matthew Holt 2023-05-04 16:30:34 -06:00
parent f3e8b9d95f
commit cdce452edc
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -97,6 +97,9 @@ func (nw NetWriter) OpenWriter() (io.WriteCloser, error) {
}
conn, err := reconn.dial()
if err != nil {
if !nw.SoftStart {
return nil, err
}
// don't block config load if remote is down or some other external problem;
// we can dump logs to stderr for now (see issue #5520)
fmt.Fprintf(os.Stderr, "[ERROR] net log writer failed to connect: %v (will retry connection and print errors here in the meantime)\n", err)