Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c19f09

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /