Added support for canceling transfers

r? @jimdanz