# Prevent sending a reconnect following certain codes.
# This always requires a new session to be established if these codes are encountered.
# Not sure if 1000 and 1001 require this, but I don't think it hurts to include them.
has no_resume => ( is => 'ro', default => sub {
{
'4003' => 'Not Authenticated',
'4007' => 'Invalid Sequence',
'4009' => 'Session Timeout',
'4010' => 'Invalid Shard',
'4011' => 'Sharding required',
'4012' => 'Invalid API version',
'4013' => 'Invalid intent(s)',
'4014' => 'Disallowed intent(s)',
'Websocket Handshake Failed' => 'Websocket Handshake Failed'
}
});
As we now have removed the 1xxx from no_resume, this should be adjusted a bit and split into 2 hashes, one which just disables resuming like now and one which quits the library because the error probably won't be gone after reconnecting.
New:
has no_resume => ( is => 'ro', default => sub {
{
'4007' => 'Invalid Sequence',
'4009' => 'Session Timeout',
'Websocket Handshake Failed' => 'Websocket Handshake Failed'
}
});
has quit_on_those => ( is => 'ro', default => sub {
{
'4004' => 'Authentication failed',
'4010' => 'Invalid Shard',
'4011' => 'Sharding required',
'4012' => 'Invalid API version',
'4013' => 'Invalid intent(s)',
'4014' => 'Disallowed intent(s)',
}
});
Currently theres this:
As we now have removed the 1xxx from no_resume, this should be adjusted a bit and split into 2 hashes, one which just disables resuming like now and one which quits the library because the error probably won't be gone after reconnecting.
New: