Bug fix for polling for an open connection.