summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ratox.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ratox.c b/ratox.c
index 5511710..b0c4a45 100644
--- a/ratox.c
+++ b/ratox.c
@@ -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 {