3.1.5.1.4 HARD_DISCONNECT

If the bExtOpcode field indicates FRAME_EXOPCODE_HARD_DISCONNECT (0x04), the source address (for example, the IPv4 address and port type when running on UDP) for the message SHOULD be checked. If the address does not correspond to one with a fully established connection, it SHOULD be ignored. If the connection used signing, the signature MUST be valid or else the packet MUST be ignored. If a HARD_DISCONNECT message has already been received for the connection, additional actions SHOULD NOT be taken.

If the local node initiated the hard disconnect sequence, the received HARD_DISCONNECT is treated as an acknowledgment (ACK) of the previously sent HARD_DISCONNECT. The hard disconnect timer SHOULD be canceled, and connection termination SHOULD be considered complete.

Otherwise, the local node is receiving a new request to hard-terminate the connection and SHOULD abort all outstanding sends and then immediately send three HARD_DISCONNECT ACK packets. The connection is then considered to be terminated.