Minor fixes

This commit is contained in:
世界 2023-04-05 21:41:06 +08:00
parent 8b64446274
commit afd3464216
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 3 additions and 2 deletions

2
box.go
View file

@ -277,7 +277,7 @@ func (s *Box) Close() error {
} }
for i, out := range s.outbounds { for i, out := range s.outbounds {
errors = E.Append(errors, common.Close(out), func(err error) error { errors = E.Append(errors, common.Close(out), func(err error) error {
return E.Cause(err, "close inbound/", out.Type(), "[", i, "]") return E.Cause(err, "close outbound/", out.Type(), "[", i, "]")
}) })
} }
if err := common.Close(s.router); err != nil { if err := common.Close(s.router); err != nil {

View file

@ -179,5 +179,6 @@ func (w *WireGuard) Close() error {
if w.device != nil { if w.device != nil {
w.device.Close() w.device.Close()
} }
return common.Close(w.tunDevice) w.tunDevice.Close()
return nil
} }