~ghost08/server

389c7ba49889db69089ee9cd02ab16ee90e6ce27 — Vladimír Magyar 1 year, 8 months ago 1bc4b7e
Add errors to keypair reloader fsnotify
1 files changed, 6 insertions(+), 1 deletions(-)

M keypair_reloader.go
M keypair_reloader.go => keypair_reloader.go +6 -1
@@ 41,8 41,13 @@ func NewKeypairReloader(certPath, keyPath string) (*keypairReloader, error) {
				}
				log.Printf("INFO: File modified %s, reloading TLS certificate and key from %q and %q", event.Name, certPath, keyPath)
				if err := result.maybeReload(); err != nil {
					log.Printf("Keeping old TLS certificate because the new one could not be loaded: %v", err)
					log.Printf("ERROR: Keeping old TLS certificate because the new one could not be loaded: %v", err)
				}
			case err, ok := <-watcher.Errors:
				if !ok {
					return
				}
				log.Println("ERROR:", err)
			}
		}
	}()