mirror of https://github.com/h44z/wg-portal.git
Compare commits
19 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b1637b0c4e | |
|
|
0cc7ebb83e | |
|
|
eb6a787cfc | |
|
|
b546eec4ed | |
|
|
9be2133220 | |
|
|
b05837b2d9 | |
|
|
08c8f8eac0 | |
|
|
d864e24145 | |
|
|
5b56e58fe9 | |
|
|
930ef7b573 | |
|
|
18296673d7 | |
|
|
4ccc59c109 | |
|
|
e6b01a9903 | |
|
|
2f79dd04c0 | |
|
|
e5ed9736b3 | |
|
|
c8353b85ae | |
|
|
6142031387 | |
|
|
dd86d0ff49 | |
|
|
bdd426a679 |
|
|
@ -217,6 +217,15 @@ func (m Manager) RestoreInterfaceState(
|
|||
if err != nil && !iface.IsDisabled() {
|
||||
slog.Debug("creating missing interface", "interface", iface.Identifier, "backend", controller.GetId())
|
||||
|
||||
// temporarily disable interface in database so that the current state is reflected correctly
|
||||
_ = m.db.SaveInterface(ctx, iface.Identifier,
|
||||
func(in *domain.Interface) (*domain.Interface, error) {
|
||||
now := time.Now()
|
||||
in.Disabled = &now // set
|
||||
in.DisabledReason = domain.DisabledReasonInterfaceMissing
|
||||
return in, nil
|
||||
})
|
||||
|
||||
// temporarily disable interface in database so that the current state is reflected correctly
|
||||
_ = m.db.SaveInterface(ctx, iface.Identifier,
|
||||
func(in *domain.Interface) (*domain.Interface, error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue