3.1.7.25 Disconnecting a Connection

When disconnecting a neighbor connection, the local node MUST send (See section 3.1.7.1) a DISCONNECT message on the neighbor link. If the local node's Neighbor List is not empty, the DISCONNECT message MUST be built as follows:

  • Address Count: MUST be set to the number of addresses returned, up to a maximum of 10.

  • Address Offset: MUST be set as specified in section 2.2.2.5.

  • Address Array: MUST contain a list of [Address Count] least recently added addresses, based on their sequence numbers in Neighbor List.

If the local node's Neighbor List is empty, the DISCONNECT message MUST be built as follows:

  • Address Count: MUST be 0

  • Address Offset: MUST be the size of the DISCONNECT message in bytes

  • Address Array: MUST NOT be present.

After disconnecting a connection, the local node MUST perform graph maintenance, as specified in section 3.1.7.16.