open-trade лет назад: 4
Родитель
Сommit
457c74d203
1 измененных файлов с 5 добавлено и 9 удалено
  1. 5 9
      mod.rs

+ 5 - 9
mod.rs

@@ -8,15 +8,7 @@ lazy_static::lazy_static! {
8 8
     static ref STOP: Arc<Mutex<bool>> = Arc::new(Mutex::new(true));
9 9
 }
10 10
 
11
-fn is_running() -> bool {
12
-    !*STOP.lock().unwrap()
13
-}
14
-
15
-pub fn start(license: &str, host: &str) {
16
-    if is_running() {
17
-        return;
18
-    }
19
-    *STOP.lock().unwrap() = false;
11
+pub fn bootstrap(license: &str, host: &str) {
20 12
     let port = rendezvous_server::DEFAULT_PORT;
21 13
     let addr = format!("0.0.0.0:{}", port);
22 14
     let addr2 = format!("0.0.0.0:{}", port.parse::<i32>().unwrap_or(0) - 1);
@@ -47,3 +39,7 @@ pub fn start(license: &str, host: &str) {
47 39
 pub fn stop() {
48 40
     *STOP.lock().unwrap() = true;
49 41
 }
42
+
43
+pub fn start() {
44
+    *STOP.lock().unwrap() = false;
45
+}