Maybe the execution order of connect and settimeout functions in QConnection._init_socket should be switched.