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:
parent
c0556b871b
commit
31c64980f7
@ -259,6 +259,11 @@ private:
|
||||
}
|
||||
// unhandled/unknown message
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user