diff --git a/src/Connection.cpp b/src/Connection.cpp index 90298f8..6f5b05d 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -16,7 +16,6 @@ Connection::Connection(QTcpSocket *socket, WebPageManager *manager, QObject *par m_commandFactory = new CommandFactory(m_manager, this); m_commandParser = new CommandParser(socket, m_commandFactory, this); m_pageSuccess = true; - m_commandWaiting = false; connect(m_socket, SIGNAL(readyRead()), m_commandParser, SLOT(checkNext())); connect(m_commandParser, SIGNAL(commandReady(Command *)), this, SLOT(commandReady(Command *))); connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool))); @@ -29,7 +28,6 @@ void Connection::commandReady(Command *command) { } void Connection::startCommand() { - m_commandWaiting = false; if (m_pageSuccess) { m_runningCommand = new PageLoadingCommand(m_queuedCommand, m_manager, this); m_runningCommand = new TimeoutCommand(m_runningCommand, m_manager, this); diff --git a/src/Connection.h b/src/Connection.h index 59b3b70..be27e0b 100644 --- a/src/Connection.h +++ b/src/Connection.h @@ -33,7 +33,6 @@ class Connection : public QObject { CommandFactory *m_commandFactory; Command *m_runningCommand; bool m_pageSuccess; - bool m_commandWaiting; WebPage *currentPage(); }; diff --git a/src/TimeoutCommand.cpp b/src/TimeoutCommand.cpp index ab44a8b..1443735 100644 --- a/src/TimeoutCommand.cpp +++ b/src/TimeoutCommand.cpp @@ -15,6 +15,7 @@ TimeoutCommand::TimeoutCommand(Command *command, WebPageManager *manager, QObjec void TimeoutCommand::start() { if (m_manager->isLoading()) { + m_manager->logger() << this->toString() << "waiting for load to finish"; connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool))); startTimeout(); } else {