mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
wireguard: Throw exception when client can't be added
- Sometimes a newly added client can't be found even after waiting 10 seconds. In these cases the changes are mostly lost. Raise an exception instead showing that the client has been added. Tests: - When client adding fails, exception is raised instead of successfully showing the result page. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
63ca0eadff
commit
0bb52bf8ae
1 file changed
+2
-1
@@ -373,7 +373,8 @@ def add_client(public_key):
|
||||
|
||||
time.sleep(1)
|
||||
else:
|
||||
logging.warning('Could not add client %s', public_key)
|
||||
logging.warning('Error adding client %s', public_key)
|
||||
raise RuntimeError('Error adding client')
|
||||
|
||||
|
||||
def remove_client(public_key):
|
||||
|
||||
Reference in new issue
Block a user