wip: many small fixes and improvements...

This commit is contained in:
Christoph Haas
2020-11-09 23:36:19 +01:00
parent c9a9c5b393
commit c5cb22829d
2 changed files with 17 additions and 0 deletions

View File

@@ -164,3 +164,17 @@ func (s *Server) DeleteUser(user User) error {
return nil
}
func (s *Server) RestoreWireGuardInterface() error {
activeUsers := s.users.GetActiveUsers()
for i := range activeUsers {
if activeUsers[i].Peer == nil {
if err := s.wg.AddPeer(activeUsers[i].GetPeerConfig()); err != nil {
return err
}
}
}
return nil
}