Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c19f09

Browse files
committed
fix
1 parent 04d1d6b commit 1c19f09

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

sdk/QiniuWebClient.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public QiniuWebClient(double timeout = 100000.0){
5050
this.timer.Elapsed+= (object sender, ElapsedEventArgs e) => {
5151
if(!isUploading){
5252
onTimeout();
53-
this.timer.Stop();
5453
done.Set();
5554
return;
5655
}
@@ -191,6 +190,18 @@ private Stream GetPostStream (Stream putStream, string fileName, NameValueCollec
191190
private string RandomBoundary (){
192191
return String.Format ("----------{0:N}", Guid.NewGuid ());
193192
}
193+
194+
/// <summary>
195+
///
196+
/// </summary>
197+
/// <param name="disposing"></param>
198+
protected override void Dispose(bool disposing)
199+
{
200+
if (timer.Enabled) {
201+
timer.Dispose();
202+
}
203+
base.Dispose(disposing);
204+
}
194205
}
195206
}
196207

0 commit comments

Comments
 (0)