mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-22 21:26:38 +00:00
Do not spawn WS thread if it's disabled
This commit is contained in:
parent
9ecc98c3cc
commit
2e7fa6440b
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user