我正在尝试设置超时值:
CloudBlobClient cloudBlobClientUserData = cloudClientAccountUserData.createCloudBlobClient();
cloudBlobClientUserData.setTimeoutInMs(60000); //1 Minute
CloudBlobContainer container = cloudBlobClientUserData.getContainerReference(containerName);
CloudBlockBlob blob = container.getBlockBlobReference(blobName);
inputStream = new ByteArrayInputStream(data);
blob.upload(inputStream, data.length);
有时,当互联网连接较弱blob.upload(....)
时,1 分钟后不会超时。需要10多分钟。
知道为什么会这样吗?
PS:我什至尝试了 1 毫秒,例如:
cloudBlobClientUserData.setTimeoutInMs(1);
但仍然每个 blob 都在 Azure 云上上传。没有时间