1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

Catch exceptions in websockets and drop the connection

This commit is contained in:
Oliver Giles 2018-12-27 08:14:13 +02:00
parent c0556b871b
commit 31c64980f7

View File

@ -259,6 +259,11 @@ private:
} }
// unhandled/unknown message // unhandled/unknown message
return lc.ws->disconnect(); return lc.ws->disconnect();
}, [](kj::Exception&& e){
// server logs suggest early catching here avoids fatal exception later
// TODO: reproduce in unit test
KJ_LOG(WARNING, e.getDescription());
return kj::READY_NOW;
}); });
} }