Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-22 05:10:29 +01:00
Do not spawn WS thread if it's disabled
Dieser Commit ist enthalten in:
Ursprung
9ecc98c3cc
Commit
2e7fa6440b
1 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
|
@ -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();
|
||||||
|
|
||||||
|
if CONFIG.websocket_enabled {
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
WebSocket::new(factory)
|
WebSocket::new(factory)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.listen(&CONFIG.websocket_url)
|
.listen(&CONFIG.websocket_url)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
users
|
users
|
||||||
}
|
}
|
||||||
|
|
Laden …
In neuem Issue referenzieren