Permalink
Browse files

BUG 5319: Fixed deadlock in RichTextBoxTarget

  • Loading branch information...
1 parent e89ffc7 commit 18c8eb0792f7db62a5602d142510ec6f07c0d6b3 @jkowalski committed Jul 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/NLog/Targets/RichTextBoxTarget.cs
View
4 src/NLog/Targets/RichTextBoxTarget.cs
@@ -268,7 +268,7 @@ protected override void CloseTarget()
{
if (this.CreatedForm)
{
- this.TargetForm.Invoke((FormCloseDelegate)this.TargetForm.Close);
+ this.TargetForm.BeginInvoke((FormCloseDelegate)this.TargetForm.Close);
this.TargetForm = null;
}
}
@@ -309,7 +309,7 @@ protected override void Write(LogEventInfo logEvent)
string logMessage = this.Layout.Render(logEvent);
- this.TargetRichTextBox.Invoke(new DelSendTheMessageToRichTextBox(this.SendTheMessageToRichTextBox), new object[] { logMessage, matchingRule });
+ this.TargetRichTextBox.BeginInvoke(new DelSendTheMessageToRichTextBox(this.SendTheMessageToRichTextBox), new object[] { logMessage, matchingRule });
}
private static Color GetColorFromString(string color, Color defaultColor)

0 comments on commit 18c8eb0

Please sign in to comment.