Explorar el Código

fix webserver port not being released on frpc svr.Close() (#4896)

maguowei hace 3 meses
padre
commit
c3bf952d8f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      client/service.go

+ 4 - 0
client/service.go

@@ -403,6 +403,10 @@ func (svr *Service) stop() {
 		svr.ctl.GracefulClose(svr.gracefulShutdownDuration)
 		svr.ctl = nil
 	}
+	if svr.webServer != nil {
+		svr.webServer.Close()
+		svr.webServer = nil
+	}
 }
 
 func (svr *Service) getProxyStatus(name string) (*proxy.WorkingStatus, bool) {