diff options
author | sin <sin@2f30.org> | 2014-09-24 15:56:25 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-24 15:56:25 +0100 |
commit | 044dff97271136c175dc4efa1f90c8b7dcacd19e (patch) | |
tree | 217045f3bca8b7ca29e00715d89ffd2dc2fc3416 | |
parent | e020b1e9369fc6aaf9f600ab5b1bf93c1235e503 (diff) |
Cancel transfers when we come back after losing connectivity to the DHT
-rw-r--r-- | ratox.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1159,6 +1159,13 @@ loop(void) if (tox_isconnected(tox) == 1) { if (connected == 0) { printout("Connected to DHT\n"); + /* Cancel any pending transfers */ + TAILQ_FOREACH(f, &friendhead, entry) { + if (tox_get_friend_connection_status(tox, f->fid) == 0) { + canceltxtransfer(f); + cancelrxtransfer(f); + } + } connected = 1; } } else { |