in common/src/main/java/jetbrains/buildServer/torrent/torrent/TeamcityTorrentClient.java [156:185]
public Thread downloadAndShareOrFailAsync(@NotNull final File torrentFile,
@NotNull final List<String> fileNames,
@NotNull final String hexInfoHash,
@NotNull final File destFile,
@NotNull final File destDir,
@NotNull final FileProgress fileDownloadProgress,
final int downloadTimeoutMs,
final int minSeedersCount,
final int maxTimeoutForConnect,
final AtomicReference<Exception> occuredException) {
final Thread thread = new Thread(new Runnable() {
public void run() {
try {
downloadAndShareOrFail(torrentFile,
fileNames,
hexInfoHash,
destFile,
destDir,
fileDownloadProgress,
downloadTimeoutMs,
minSeedersCount,
maxTimeoutForConnect);
} catch (Exception e) {
occuredException.set(e);
}
}
});
thread.start();
return thread;
}