|
|
|
|
|
by aavegmittal
3939 days ago
|
|
Cool, thanks. Now, how are they handling "cancellation" of requests on the network (which have already been made). As far as I understand, HTTP/TCP has no option to cancel a transfer, without closing the connection itself (which would have other implications). So, once a request is made to the server, is there any option to Fresco to tell the server to stop it in some way? |
|
https://github.com/facebook/fresco/blob/c5e1d4cf2c081bf871f5...
you can ether call future.cancel() or cancel(true): in first case download task will be finished but further processing in pipeline will be stopped. Future.cancel(true) is more aggressive and abandons download but you will get InterruptedException. As you see from source code Facebook using less aggressive approach with future.cancel(false) call.