Commit 21518f1a authored by Gabriel Margiani's avatar Gabriel Margiani

wait for calls to close when shutting down

parent baee4ee7
......@@ -18,6 +18,7 @@
#include <iostream>
#include <cstdlib>
#include <chrono>
#include "server.h"
......@@ -55,6 +56,9 @@ p3::server::server() :
p3::server::~server() {
phone.hangup_all();
while (phone.get_call_count()) {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
finish_threads();
}
......
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