Fixed locking while waiting for response after connection