JSON API close restbed session before shutting down

This commit is contained in:
Gioacchino Mazzurco 2018-09-01 15:54:11 +02:00
parent 7a37c11e47
commit 7f74313552
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -62,8 +62,9 @@ JsonApiServer::JsonApiServer(
mPort(port), mShutdownCallback(shutdownCallback)
{
registerHandler("/jsonApiServer/shutdown",
[this](const std::shared_ptr<rb::Session>)
[this](const std::shared_ptr<rb::Session> session)
{
session->close(rb::OK);
shutdown();
});