mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-02 03:17:37 +03:00
Fix AppendClose
This commit is contained in:
parent
7fd3517e4d
commit
30e9d91b57
1 changed files with 3 additions and 2 deletions
|
@ -74,9 +74,10 @@ type ExtendedConn interface {
|
|||
type CloseHandlerFunc = func(it error)
|
||||
|
||||
func AppendClose(parent CloseHandlerFunc, onClose CloseHandlerFunc) CloseHandlerFunc {
|
||||
if onClose == nil {
|
||||
panic("nil onClose")
|
||||
}
|
||||
if parent == nil {
|
||||
return parent
|
||||
} else if onClose == nil {
|
||||
return onClose
|
||||
}
|
||||
return func(it error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue