vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 2e7fa6440b299d59339e58ec413516104954f7aa
parent 9ecc98c3ccdb01c6c69765f543100256be5a12c1
Author: Miroslav Prasil <miroslav@prasil.info>
Date:   Mon, 15 Oct 2018 15:08:15 +0100

Do not spawn WS thread if it's disabled

Diffstat:
Msrc/api/notifications.rs | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/api/notifications.rs b/src/api/notifications.rs @@ -360,12 +360,14 @@ pub fn start_notification_server() -> WebSocketUsers { let factory = WSFactory::init(); let users = factory.users.clone(); - thread::spawn(move || { - WebSocket::new(factory) - .unwrap() - .listen(&CONFIG.websocket_url) - .unwrap(); - }); + if CONFIG.websocket_enabled { + thread::spawn(move || { + WebSocket::new(factory) + .unwrap() + .listen(&CONFIG.websocket_url) + .unwrap(); + }); + } users }