22.214.171.124 Disconnect SSTP Tunnel Event
To bring down the SSTP tunnel, the management layer on the client MUST send a disconnect SSTP tunnel request to the SSTP layer. This event can be used to bring down the established SSTP tunnel or a call setup that is in progress.
For an established SSTP tunnel, this request typically comes after the encapsulated protocol has completed its teardown (in this specific implementation, it is the PPP). After the PPP is torn down, SSTP is triggered to bring down the SSTP tunnel by sending this event. On receiving this event, the SSTP peer initiates the disconnection by sending the Call Disconnect message to the SSTP far end. Section 126.96.36.199.1 specifies the protocol state machine details for the disconnect event processing. For more information about PPP teardown, see [RFC1661] section 3.7.
For a call setup in progress, it is possible for the disconnect event to occur due to cancellation of the establish SSTP tunnel request. In this case, irrespective of the current state, the SSTP peer changes CurrentState to Call_Disconnect_In_Progress_1. Upon entering this state, the SSTP peer sends an SSTP_MSG_CALL_DISCONNECT to the SSTP far end, starts the TIMER_VAL_DISCONNECT_STATE_TIMER_1 timer and then updates CurrentState to Call_Disconnect_Ack_Pending. The SSTP far end MUST acknowledge the disconnect request by sending SSTP_MSG_CALL_DISCONNECT_ACK regardless of the value of CurrentState.
After the SSTP message exchange is completed, the HTTPS layer MUST be notified about this event, and the HTTPS layer SHOULD eventually be brought down.
After the SSTP disconnect message exchange (sections 188.8.131.52.1 and 4.4) is completed, the SSTP layer MUST notify the HTTPS layer to disconnect. The HTTPS layer SHOULD be brought down after this occurs.