OkHttp sources and sinks are not threadsafe, fix #369
This commit is contained in:
parent
8db30d8537
commit
2dbad2b16a
@ -100,14 +100,8 @@ public class OkHttpEngine implements HttpEngine {
|
||||
if (mInputStream == null)
|
||||
return;
|
||||
|
||||
final InputStream is = mInputStream;
|
||||
IOUtils.closeQuietly(mInputStream);
|
||||
mInputStream = null;
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
IOUtils.closeQuietly(is);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user