check for valid socket before flushing
Avoid unnecessary timeouts in Windows code
./configure --with-qt=qt5