QT4:: QSocketNotifier: Invalid socket 12 and type 'Read', disabling...

Модератор: Модераторы разделов

Аватара пользователя
Voral
Сообщения: 1205
ОС: Debian Wheezy (amd64)

QT4:: QSocketNotifier: Invalid socket 12 and type 'Read', disabling...

Сообщение Voral »

Есть код

Код: Выделить всё

VServerThread::~VServerThread(){
    qDebug("Server thread: destroy");
}

void VServerThread::run() {
    QTcpSocket tcpSocket;
    if (!tcpSocket.setSocketDescriptor(socketDescriptor)) {
        emit error(tcpSocket.error());
        return;
    }
    connect(&tcpSocket,SIGNAL(disconnected()),this,SLOT(disconnected()));
    connect(&tcpSocket,SIGNAL(readyRead()),this,SLOT(getData()));
    qDebug("Server thread: starting");
    this->exec();
    qDebug("Server thread: stoped");
    tcpSocket.disconnectFromHost();
    if (tcpSocket.state() == QAbstractSocket::UnconnectedState || tcpSocket.waitForDisconnected(1000)) qDebug("Disconnected!");
}
void VServerThread::disconnected(void){
    qDebug("Server thread: disconnect");
    this->exit(0);
};


Запускаю, коннекчусь клиентом, затем закрываю приложение-клиент. (в нем дисконект ни как не рализован - т.е. "нештатный" разрыв)
В консоли остается следующее:

Код: Выделить всё

Server: Start
Server: New Connection
Server thread: starting
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
Server thread: disconnect
Server thread: stoped
Disconnected!
Server thread: destroy


Напрягает сообщение "QSocketNotifier:...." Его стоит както обрабатывать? Или это естественное сообщение при разрыве связи?
То что не убивает нас, делает нас сильнее! © Ницше.
When life puts you in tough situations, don’t say "why me". Just say "try me © ?
Спасибо сказали: