Improve state dumping.

This commit is contained in:
Michael Meeks
2017-03-10 15:37:09 +00:00
parent 7a90430f85
commit 3b370022c0
3 changed files with 11 additions and 4 deletions

View File

@ -1305,12 +1305,21 @@ void DocumentBroker::dumpState()
{
std::unique_lock<std::mutex> lock(_mutex);
std::cerr << " Broker: " << _filename << "\n";
std::cerr << " Broker: " << _filename;
if (_markToDestroy)
std::cerr << " *** Marked to destroy ***\n";
else
std::cerr << " has live sessions\n";
std::cerr << " loaded?: " << _isLoaded << "\n";
std::cerr << " modified?: " << _isModified << "\n";
std::cerr << " jail id: " << _jailId << "\n";
std::cerr << " public uri: " << _uriPublic.toString() << "\n";
std::cerr << " jailed uri: " << _uriJailed.toString() << "\n";
std::cerr << " doc key: " << _docKey << "\n";
std::cerr << " num sessions: " << getSessionsCount() << "\n";
std::cerr << " last editable?: " << _lastEditableSession << "\n";
std::cerr << " cursor " << _cursorPosX << ", " << _cursorPosY
<< "( " << _cursorWidth << "," << _cursorHeight << ")\n";
_poll->dumpState();
}

View File

@ -34,8 +34,6 @@
#include <Poco/StreamCopier.h>
#include <Poco/StringTokenizer.h>
#include <Poco/URI.h>
#include <Poco/Util/ServerApplication.h>
#include <Poco/Util/Timer.h>
#include "Auth.hpp"
#include "Common.hpp"

View File

@ -2259,7 +2259,7 @@ private:
_clientSession = createNewClientSession(ws, _id, uriPublic, docBroker, isReadOnly);
if (_clientSession)
{
// Transfer the socket to the DocumentBroker.
// Transfer the client socket to the DocumentBroker.
auto socket = _socket.lock();
if (socket)
{