When a client sends an attention message to cancel an outstanding request, the SRV_T_GOTATTENTION thread property is set to CS_TRUE and the SRV_ATTENTION event handler is called. The specific attention handling needs of a connection migration are described below:
For the SRV_MIGRATE_STATE event handler and SRV_MIG_READY state:
If the attention message arrives in the SRV_MIGRATE_STATE event handler before the client indicates that it is ready to migrate, Open Server acknowledges the attention when the SRV_MIGRATE_STATE event handler ends. This completes the request from the client. After a successful migration, the server that the client has migrated to does not receive this attention message and, because the client is not waiting for results from Open Server, the SRV_MIGRATE_RESUME event handler is not called.
Thus, your application must check if the SRV_T_GOTATTENTION property is set to CS_TRUE before making the context available to other servers. If SRV_T_GOTATTENTION is set to CS_TRUE, you must update the context to indicate that the client has cancelled the operation.
For the SRV_MIGRATE_RESUME event handler:
If the client has sent the attention message after the client indicated that it is ready to migrate and the migration succeeded, the attention is sent to the server to which the client has migrated. It is therefore possible that, after a successful migration, an attention can be received by the SRV_MIGRATE_RESUME event handler even if the original server has updated the context to reflect the cancellation. Thus, your application must check if the client has sent an attention to the server before it can execute the SRV_MIGRATE_RESUME event handler.