Java 对Azure的调用在套接字读取时挂起
我正在使用他们的JavaSDK给Azure打电话。有时,调用挂起在套接字读取上,永远不会返回。我尝试过使用SDK的0.5.0和0.6.0版本,但结果相同。有没有办法设置读取和连接超时?我试过使用以下方法,但它们似乎没有被使用。有什么建议吗Java 对Azure的调用在套接字读取时挂起,java,azure,sdk,Java,Azure,Sdk,我正在使用他们的JavaSDK给Azure打电话。有时,调用挂起在套接字读取上,永远不会返回。我尝试过使用SDK的0.5.0和0.6.0版本,但结果相同。有没有办法设置读取和连接超时?我试过使用以下方法,但它们似乎没有被使用。有什么建议吗 URI uri = new URI("https://management.core.windows.net"); //$NON-NLS-1$ configuration = ManagementConfiguration.configure(
URI uri = new URI("https://management.core.windows.net"); //$NON-NLS-1$
configuration = ManagementConfiguration.configure(uri, subscriptionId, keyStoreLocation, keyStorePassword, KeyStoreType.jks);
configuration.setProperty(Configuration.PROPERTY_CONNECT_TIMEOUT, new Integer(1));
configuration.setProperty(Configuration.PROPERTY_READ_TIMEOUT, new Integer(1));
computeManagementClient = ComputeManagementService.create(configuration);
使用0.7.0版本时也会出现同样的问题。您是否设法找出了问题所在或如何设置超时?