mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-01-30 20:56:54 +00:00
Write close error to log
This commit is contained in:
parent
957f2e0087
commit
03c432a8c4
|
@ -188,9 +188,12 @@ func run() error {
|
||||||
cancel()
|
cancel()
|
||||||
closeCtx, closed := context.WithCancel(context.Background())
|
closeCtx, closed := context.WithCancel(context.Background())
|
||||||
go closeMonitor(closeCtx)
|
go closeMonitor(closeCtx)
|
||||||
instance.Close()
|
err = instance.Close()
|
||||||
closed()
|
closed()
|
||||||
if osSignal != syscall.SIGHUP {
|
if osSignal != syscall.SIGHUP {
|
||||||
|
if err != nil {
|
||||||
|
log.Error(E.Cause(err, "sing-box did not closed properly"))
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue