---
title: "Shutdown and Draining"
description: "Learn more about the default behavior of our SDK if the application shuts down unexpectedly."
url: https://docs.sentry.io/platforms/dotnet/guides/xamarin/configuration/draining/
---

# Shutdown and Draining | Sentry for Xamarin

By default the SDK sends out events over the network on a background thread. This means that some events might be lost if the application shuts down unexpectedly. The SDK provides mechanisms to cope with this.

The Xamarin SDK automatically shuts down and waits `ShutdownTimeout` seconds before that happens when the `Init`'s return:

```csharp
SentryXamarin.Init(...));
// App code
```

In case of an unhandled exception that will crash the app, the SDK automatically disposes itself.
