mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-11-30 01:16:53 +00:00
fix: close connection after error handling in snell outbound
This commit is contained in:
1 parent
0436650753
commit
187c6342c4
1 file changed
+6
-1
@@ -291,7 +291,12 @@ func NewSnell(option SnellOption) (*Snell, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s.streamConnContext(ctx, c)
|
||||
sc, err := s.streamConnContext(ctx, c)
|
||||
if err != nil {
|
||||
_ = c.Close()
|
||||
return nil, err
|
||||
}
|
||||
return sc, nil
|
||||
})
|
||||
}
|
||||
return s, nil
|
||||
|
||||
Reference in new issue
Block a user