redirect exceptions in result sender to log

pull/5/head
Zlatin Balevsky 2019-06-20 17:22:59 +01:00
parent 761b683a81
commit a455b4ad6e
1 changed files with 45 additions and 40 deletions

View File

@ -11,6 +11,7 @@ import java.util.concurrent.Executor
import java.util.concurrent.Executors
import java.util.concurrent.ThreadFactory
import java.util.concurrent.atomic.AtomicInteger
import java.util.logging.Level
import java.util.stream.Collectors
import com.muwire.core.DownloadedFile
@ -83,6 +84,7 @@ class ResultsSender {
@Override
public void run() {
try {
byte [] tmp = new byte[InfoHash.SIZE]
JsonOutput jsonOutput = new JsonOutput()
Endpoint endpoint = null;
@ -128,6 +130,9 @@ class ResultsSender {
} finally {
endpoint?.close()
}
} catch (Exception e) {
log.log(Level.WARNING, "problem sending results",e)
}
}
}
}