Write close error to log

This commit is contained in:
世界 2024-08-10 16:47:44 +08:00
parent fc8faa95dd
commit d8f8fdacac
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -188,9 +188,12 @@ func run() error {
cancel()
closeCtx, closed := context.WithCancel(context.Background())
go closeMonitor(closeCtx)
instance.Close()
err = instance.Close()
closed()
if osSignal != syscall.SIGHUP {
if err != nil {
log.Error(E.Cause(err, "sing-box did not closed properly"))
}
return nil
}
break