fix(portforward): trigger after VPN restart

This commit is contained in:
Quentin McGaw
2023-09-28 14:00:58 +00:00
parent a194906bdd
commit d4df87286e
10 changed files with 112 additions and 79 deletions

View File

@@ -14,6 +14,7 @@ func (s *Service) Stop() (err error) {
serviceNotRunning := s.port == 0
s.portMutex.RUnlock()
if serviceNotRunning {
// TODO replace with goservices.ErrAlreadyStopped
return nil
}
@@ -36,7 +37,7 @@ func (s *Service) cleanup() (err error) {
s.port = 0
filepath := *s.settings.UserSettings.Filepath
filepath := s.settings.Filepath
s.logger.Info("removing port file " + filepath)
err = os.Remove(filepath)
if err != nil {