fetcher base: check if thread exists before disposing it
This commit is contained in:
parent
7b0a359005
commit
cf7372a94c
|
@ -40,6 +40,8 @@ namespace SparkleLib {
|
|||
protected string remote_url;
|
||||
private Thread thread;
|
||||
|
||||
public abstract bool Fetch ();
|
||||
|
||||
|
||||
public SparkleFetcherBase (string server, string remote_folder, string target_folder)
|
||||
{
|
||||
|
@ -102,14 +104,13 @@ namespace SparkleLib {
|
|||
|
||||
public void Dispose ()
|
||||
{
|
||||
this.thread.Abort ();
|
||||
this.thread.Join ();
|
||||
if (this.thread != null) {
|
||||
this.thread.Abort ();
|
||||
this.thread.Join ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public abstract bool Fetch ();
|
||||
|
||||
|
||||
private void DisableHostKeyCheckingForHost (string host)
|
||||
{
|
||||
string ssh_config_file_path = SparkleHelpers.CombineMore (
|
||||
|
|
Loading…
Reference in a new issue