mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-12-14 09:33:44 +01:00
Do not spawn WS thread if it's disabled
This commit is contained in:
parent
9ecc98c3cc
commit
2e7fa6440b
1 changed files with 8 additions and 6 deletions
|
@ -360,12 +360,14 @@ pub fn start_notification_server() -> WebSocketUsers {
|
||||||
let factory = WSFactory::init();
|
let factory = WSFactory::init();
|
||||||
let users = factory.users.clone();
|
let users = factory.users.clone();
|
||||||
|
|
||||||
thread::spawn(move || {
|
if CONFIG.websocket_enabled {
|
||||||
WebSocket::new(factory)
|
thread::spawn(move || {
|
||||||
.unwrap()
|
WebSocket::new(factory)
|
||||||
.listen(&CONFIG.websocket_url)
|
.unwrap()
|
||||||
.unwrap();
|
.listen(&CONFIG.websocket_url)
|
||||||
});
|
.unwrap();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
users
|
users
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue