Partager via


1.3.1.4.1 User-Initiated on Client

The user can initiate a client-side disconnect by closing the RDP client application. To implement this type of disconnection the client can initiate an immediate disconnect by sending the MCS Disconnect Provider Ultimatum PDU (with the reason code set to "user requested") and then closing the connection. Alternatively, the client can first notify the server of the intent to disconnect by sending the Shutdown Request PDU and then waiting for a response. The server response to this PDU is determined by whether the session is associated with a logged-on user account.

  • If a logged-on user account is associated with the session, the server always denies the shutdown request and sends the client a Shutdown Request Denied PDU. At this point the client behavior is implementation-dependent (the client can, for example, choose to display a dialog box specifying that the session will be disconnected). If the decision is made to proceed with the disconnection, the client sends the server an MCS Disconnect Provider Ultimatum PDU (with the reason code set to "user requested") and closes the connection.

  • If a logged-on user account is not associated with the session, the server closes the connection immediately after receiving the Shutdown Request PDU.

The sending and processing of the Shutdown Request PDU is described in sections 3.2.5.4.1 and 3.3.5.4.1 respectively. The sending and processing of the Shutdown Request Denied PDU is described in sections 3.3.5.4.2 and 3.2.5.4.2 respectively.