mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Use errors.Is instead of string comparison
This commit is contained in:
parent
13ebd4db7d
commit
d39599f8fb
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ func (as *AppService) Start() {
|
|||
} else {
|
||||
err = as.server.ListenAndServeTLS(as.Host.TLSCert, as.Host.TLSKey)
|
||||
}
|
||||
if err != nil && err.Error() != "http: Server closed" {
|
||||
if err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||
as.Log.Fatalln("Error while listening:", err)
|
||||
} else {
|
||||
as.Log.Debugln("Listener stopped.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue