mirror of
https://github.com/fatedier/frp.git
synced 2025-04-24 16:51:27 +00:00
Compare commits
1 Commits
8ad9ec3d34
...
10af60f2fd
Author | SHA1 | Date | |
---|---|---|---|
|
10af60f2fd |
@ -19,6 +19,8 @@ import (
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
"github.com/fatedier/golib/errors"
|
||||
|
||||
v1 "github.com/fatedier/frp/pkg/config/v1"
|
||||
"github.com/fatedier/frp/pkg/msg"
|
||||
)
|
||||
@ -88,9 +90,11 @@ func (pxy *XTCPProxy) Run() (remoteAddr string, err error) {
|
||||
}
|
||||
|
||||
func (pxy *XTCPProxy) Close() {
|
||||
pxy.BaseProxy.Close()
|
||||
pxy.rc.NatHoleController.CloseClient(pxy.GetName())
|
||||
pxy.closeOnce.Do(func() {
|
||||
pxy.BaseProxy.Close()
|
||||
pxy.rc.NatHoleController.CloseClient(pxy.GetName())
|
||||
close(pxy.closeCh)
|
||||
_ = errors.PanicToError(func() {
|
||||
close(pxy.closeCh)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user