frps: release resources in service.Close() (#4667)

This commit is contained in:
fatedier authored and GitHub committed 2025-02-12 12:22:57 +08:00
1 parent 8b86e1473c
commit e0dd947e6a
6 files changed
+35 -37

No files matched your search

+10
View File
@@ -59,3 +59,13 @@ type ResourceController struct {
// All server manager plugin
PluginManager *plugin.Manager
}
func (rc *ResourceController) Close() error {
if rc.VhostHTTPSMuxer != nil {
rc.VhostHTTPSMuxer.Close()
}
if rc.TCPMuxHTTPConnectMuxer != nil {
rc.TCPMuxHTTPConnectMuxer.Close()
}
return nil
}