From 72f3fe2f5dc1314a1d3353819cb1ab7bc45da240 Mon Sep 17 00:00:00 2001 From: Jacksgong Date: Mon, 21 Aug 2017 17:01:18 +0800 Subject: [PATCH] prefs: end the verify connection when using the multiple connection --- .../filedownloader/download/DownloadLaunchRunnable.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java index f5f8cf65..c3811ff3 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java +++ b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java @@ -303,6 +303,10 @@ public void run() { // single connection fetchWithSingleConnection(firstConnectionTask.getProfile(), connection); } else { + if (connection != null) { + connection.ending(); + connection = null; + } // multiple connection statusCallback.onMultiConnection(); if (isResumeAvailableOnDB) {