Commit 741466ad authored by Felix Häcker's avatar Felix Häcker

clear everything from previous task when starting a new one

parent c5a7712b
......@@ -71,7 +71,6 @@ impl AsyncClient{
pub fn clear_task(&mut self){
*self.next_task.lock().unwrap() = None;
pub fn start_loop(&mut self){
......@@ -85,6 +84,9 @@ impl AsyncClient{
let mut sync_client = Client::new(&base_url);
// clear everything from previous task
// Get the task, and unset "next_task"
let task: Task = next_task.lock().unwrap().clone().unwrap();
*next_task.lock().unwrap() = None;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment