我有以下代码,工作正常:
HttpConnection request =
(HttpConnection) Connector.open("https://www.google.com");
// It locks at the following line until an exception is thrown
int responseCode = request.getResponseCode();
突然间,它开始在getResponseCode()行阻塞,直到抛出异常,并显示以下消息:
Local connection timed out after ~ 120000
一切都发生在模拟器中,我启用了MDS。