Hello,
I am trying to connect to a host in my core application. If socket can connect to the host; no problem...But if it cannot resolve the hostname, the application stucks there. The application doesn't crash; but just refuses to exit, after that point...

I tried QCoreApplication::exit() and standart c library exit() functions, none could terminate the program. Is there any way to exit the program, no matter how?

that is the stubborn connecttohost function:
Qt Code:
  1. d->socket->connectToHost( d->pop3_server , d->port );
To copy to clipboard, switch view to plain text mode 

I tried (not good but, need it.. ):
Qt Code:
  1. QTimer::singleShot(20000, this, SLOT(exitnow()));
To copy to clipboard, switch view to plain text mode 

my slot:
Qt Code:
  1. void Pop3::exitnow()
  2. {
  3. QCoreApplicaition::exit(0);
  4. }
To copy to clipboard, switch view to plain text mode 

also tried:
Qt Code:
  1. void Pop3::exitnow()
  2. {
  3. exit(0);
  4. }
To copy to clipboard, switch view to plain text mode 

I debugged the application and saw that the exitnow() slot is called;but the application doesn't terminate.