dji-sdk / DJI-Cloud-API-Demo

MIT License
147 stars 105 forks source link

bug report: some AliOss object need to close manually. otherwise will hang up main thread to wait available connection #47

Open witcom opened 11 months ago

witcom commented 11 months ago

OSS#getObject返回的OSSObject是需要手动释放的。如果用完默认的1024个连接,主线程会被挂起等待可用连接。 key point: org.apache.http.impl.conn.PoolingHttpClientConnectionManager#leaseConnection 若没有连接会在 entry = future.get(timeout, timeUnit); line: 306 挂起

已查 OSS#getObject 和 OSS#putObject 是不会自动释放的。 其他方法可检查方法调用的 com.aliyun.oss.internal.OSSOperation#doOperation(..., keepResponseOpen) keepResponseOpen是否为true

RelateCode