feat: cleanup remote client on connection closed
This commit is contained in:
parent
1fc335418b
commit
7aa977d2fe
|
@ -125,6 +125,12 @@ func (c *RemoteClient) Proxy(ctx context.Context, network, address string) (net.
|
|||
return c.control.Proxy(ctx, network, address)
|
||||
}
|
||||
|
||||
func (c *RemoteClient) Close() {
|
||||
if c.sess != nil && !c.sess.IsClosed() {
|
||||
c.sess.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func NewRemoteClient() *RemoteClient {
|
||||
return &RemoteClient{}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue