actualizado el servidor HTTP

This commit is contained in:
Luis Ángel San Martín
2013-06-13 13:53:34 +02:00
parent d4ef318190
commit dee244455e
6 changed files with 25 additions and 6 deletions

View File

@ -31,6 +31,9 @@ HttpConnectionHandler::HttpConnectionHandler(QSettings* settings, HttpRequestHan
HttpConnectionHandler::~HttpConnectionHandler() {
socket.close();
quit();
wait();
qDebug("HttpConnectionHandler (%p): destroyed", this);
}
@ -53,6 +56,7 @@ void HttpConnectionHandler::handleConnection(int socketDescriptor) {
qDebug("HttpConnectionHandler (%p): handle new connection", this);
busy = true;
Q_ASSERT(socket.isOpen()==false); // if not, then the handler is already busy
if (!socket.setSocketDescriptor(socketDescriptor)) {
qCritical("HttpConnectionHandler (%p): cannot initialize socket: %s", this,qPrintable(socket.errorString()));
return;