Merge pull request #1805 from Kimbsen/master

Fix panic on macos when passing a certificate as []byte to iris.TLS()
This commit is contained in:
Gerasimos (Makis) Maropoulos 2021-09-14 21:21:12 +03:00 committed by GitHub
commit 10cb915d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,7 +517,7 @@ func (su *Supervisor) shutdownOnInterrupt(ctx context.Context) {
// fileExists tries to report whether a local physical file of "filename" exists.
func fileExists(filename string) bool {
info, err := os.Stat(filename)
if os.IsNotExist(err) {
if err != nil {
return false
}