The only way a transfer can be stopped is if one of the participants cancels it manually.
For the Sender
If you disconnect from the Internet while transfers are being sent, all your transfers will be paused. If you have finished sending a file, but your recipient has not downloaded it, the transfer will be temporarily stored on a server ("cloud buffered") for 14 days or until your recipient downloads it.
For the Recipient
Disconnecting from the Internet simply pauses your transfer. Your sender will continue to upload the transfer to a server where it will be stored temporarily ("cloud buffered"). When you reconnect to the Internet, you will thus not have to wait until your sender comes back online, but rather your download will resume from the server.