Catch exception from websocketpp

This commit is contained in:
Nik Bougalis
2016-06-27 12:54:11 -07:00
committed by seelabs
parent 177a52473a
commit 8c90ef810a

View File

@@ -71,7 +71,17 @@ private:
JLOG (j_.warn())
<< "Websocket: listening on " << desc_.port;
listen();
try
{
listen();
}
catch (std::exception const& e)
{
JLOG (j_.warn()) <<
"Websocket: failed to listen on " <<
desc_.port << ": " << e.what();
}
{
std::lock_guard<std::recursive_mutex> lock (endpointMutex_);
endpoint_.reset();