Your application can terminate a client connection even when a migration has been requested; however, a new client command that is sent just before Open Server issued the termination command may get lost. To avoid this, your application must:
If possible, avoid terminating connections when a client is instructed to migrate.
If there is a need to disconnect a client, Open Server must set a reasonable wait time before requesting the migration. This gives a client the time to detect the migration request before it issues another command.
When Open Server terminates a connection, the SRV_DISCONNECT event handler is called. Inside this handler, ensure that the context is available to other servers if the migration state is still set to SRV_MIG_REQUESTED.