Question about listening on an outgoing file transfer

I am trying to send a file to a client from a basic program i made like:

FileTransferManager fileXferManager;
fileXferManager = new FileTransferManager(connection);
OutgoingFileTransfer transfer = fileXferManager.createOutgoingFileTransfer(destination);
transfer.sendFile(fileToBeSent,“test file”);

The file gets sent and received fine. But , if i send a file and the user accepts then cancels it, on my side the transfer.status is still “In Progress” and the file is still being sent even though it was cancelled. I am not sure how to monitor a “cancel” from the receiving end… any help please? thanks