Site Tools


on_reconnect_required

Synopsis:

on [<modes>]reconnect_required [<serial#>] [-|^]<match> { <action> }

Description:

The ON RECONNECT_REQUIRED hook is thrown by the client when it feels that a reconnection intervention is appropriate. We are going to start this small, and build in more use cases as we go forward.

  1. When server is in ACTIVE state and the socket dies
  2. When a write to the server fails

In these situations, your script should take whatever measures are necessary to save the state of windows, channels, etc, in preparation for the upcoming disconnection.

This ON is thrown while the server is in a state of chaos. The internal state of the system is wrong, and you must assume that the connection to the server has already been lost.

YOU MUST NOT try to do anything clever in this on. If you have this idea of moving windows or servers or channels, please don't! You should set up timers and defers so you can do those sorts of changes away from the blast radius.

YOU MUST NEVER attempt to do any direct intervention in this on – instead, you should save information and create a timer to deal with the problem later. YOU HAVE BEEN WARNED.

Parameters:

$0 The server that unexpectedly failed on us. Reconnection will be required. Remember, you cannot do reconnection in the on, you have to schedule it to happen “later”

Examples:

See the reconnect_script for how this gets used

History:

The ON RECONNECT_REQUIRED hook first appeared in EPIC5-2.1.6.

on_reconnect_required.txt · Last modified: 2021/10/17 20:00 by 127.0.0.1