我正在使用包含一些附加功能的示例应用程序。有时,由于错误 500,对 setCurrentTime API 的调用会导致 SimpleHttpClient 中的 IOException,而在其他时候,它在一分钟后使用完全相同的代码就可以正常工作。什么可能导致这种情况?
这是它不工作时的日志摘录:
09-26 13:12:42.023 5782-14444/de.sebastian_brocks.camerasony D/SimpleRemoteApi: Response: {"result":["Smart Remote Control SR\/3.01 __MNG__","2.1.2"],"id":6}
09-26 13:12:42.025 5782-14444/de.sebastian_brocks.camerasony D/CameraServiceSony: setting current time
09-26 13:12:42.042 5782-14444/de.sebastian_brocks.camerasony D/SimpleRemoteApi: Request: {"id":7,"method":"setCurrentTime","version":"1.0","params":[{"dstOffsetMinute":60,"dateTime":"2016-09-26T11:12:42Z","timeZoneOffsetMinute":60}]}
09-26 13:12:42.045 5782-14444/de.sebastian_brocks.camerasony I/System.out: [socket][74] connection /192.168.122.1:8080;LocalPort=59573(10000)
09-26 13:12:42.049 5782-14444/de.sebastian_brocks.camerasony I/System.out: [CDS]connect[/192.168.122.1:8080] tm:10
09-26 13:12:42.052 5782-14444/de.sebastian_brocks.camerasony D/Posix: [Posix_connect Debug]Process de.sebastian_brocks.camerasony :8080
09-26 13:12:42.055 5782-14444/de.sebastian_brocks.camerasony I/System.out: [socket][/192.168.122.206:59573] connected
09-26 13:12:42.057 5782-14444/de.sebastian_brocks.camerasony I/System.out: [CDS]rx timeout:10000
09-26 13:12:42.088 5782-14444/de.sebastian_brocks.camerasony W/SimpleHttpClient: httpPost: Response Code Error: 500: http://192.168.122.1:8080/sony/system
09-26 13:12:42.090 5782-14444/de.sebastian_brocks.camerasony W/SimpleHttpClient: httpPost: IOException: Response Error:500
09-26 13:12:42.093 5782-14444/de.sebastian_brocks.camerasony I/System.out: [CDS]close[59573]
09-26 13:12:42.097 5782-14444/de.sebastian_brocks.camerasony I/System.out: close [socket][/0.0.0.0:59573]
09-26 13:12:42.099 5782-14444/de.sebastian_brocks.camerasony W/CameraServiceSony: openConnection : IOException: Response Error:500