mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-30 12:34:26 +00:00
Change again socket reconnect logic
This commit is contained in:
@@ -25,6 +25,24 @@ namespace ElectronNET.API
|
||||
/// </summary>
|
||||
public static bool SocketDebug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Handle hard fails of connecting to the socket. The application must exit when this event is raised.
|
||||
/// The default behavior is to exit with code 0xDEAD
|
||||
/// </summary>
|
||||
public static event Action OnSocketConnectFail;
|
||||
|
||||
internal static bool TryRaiseOnSocketConnectFail()
|
||||
{
|
||||
if (OnSocketConnectFail is object)
|
||||
{
|
||||
OnSocketConnectFail();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Emitted when the user clicks on the dock on Mac
|
||||
|
||||
Reference in New Issue
Block a user