Created
February 7, 2012 04:00
-
-
Save Romiko/1757083 to your computer and use it in GitHub Desktop.
Wait for Windows Diagnostics to wake up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void WaitForWindowsAzureDiagnosticsInfrastructureToCatchUp() | |
{ | |
// According to http://l.tath.am/k6uPrK, the diagnostics infrastructure takes a | |
// few seconds to start. If a crash occurs during this time, we'd never be | |
// able to find out why. | |
// We also need to do this at the /end/ of the role. Even if we explicitly flush | |
// the trace, it'll still lose the last few messages if we exit too quickly. | |
Thread.Sleep(TimeSpan.FromSeconds(10)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment