[apibrk] change: Specify WebSocket close code (#1500)

* API breaking change: Specify WebSocket close code

Should fix #1479 and help overall with resuming sessions.

* Also try to resume on missed heartbeats
This commit is contained in:
Monica S
2020-04-25 12:12:57 +01:00
committed by GitHub
parent 6d8e216545
commit ed869bd78b
7 changed files with 48 additions and 31 deletions

View File

@@ -0,0 +1,22 @@
using System;
namespace Discord.WebSocket
{
/// <summary>
/// An exception thrown when the gateway client has been requested to
/// reconnect.
/// </summary>
public class GatewayReconnectException : Exception
{
/// <summary>
/// Creates a new instance of the
/// <see cref="GatewayReconnectException"/> type.
/// </summary>
/// <param name="message">
/// The reason why the gateway has been requested to reconnect.
/// </param>
public GatewayReconnectException(string message)
: base(message)
{ }
}
}