Hello guys.
i have a socket connection using try and catch, but after of show error message with catch my application is close automatically.
My code:
try
{
sockets = await Task.Run(() => sockets = new Socket("IP", PORT));
}
catch (SocketException ex)
{
Device.BeginInvokeOnMainThread(async() =>
{
await dialogservice.ShowMessage("Error", "Error in download: " + ex.Message + "In" +
": " + ex.Source + "or too: " + ex.LocalizedMessage);
});
}
``
I need that my application dont close after of show message by catch. ¿Who know how can solve this?.