Better handling of connection waiting