@@ -692,11 +692,14 @@ QuicConnIndicateEvent(
692692 // MsQuic shouldn't indicate reentrancy to the app when at all possible.
693693 // The general exception to this rule is when the connection is being
694694 // closed because the API MUST block until all work is completed, so we
695- // have to execute the event callbacks inline.
695+ // have to execute the event callbacks inline. Custom executions also
696+ // allow reentrancy because set/get param must be executed inline to not
697+ // block the thread, and the app is expected to handle reentrancy.
696698 //
697699 CXPLAT_DBG_ASSERT (
698700 !Connection -> State .InlineApiExecution ||
699- Connection -> State .HandleClosed );
701+ Connection -> State .HandleClosed ||
702+ MsQuicLib .CustomExecutions );
700703 Status =
701704 Connection -> ClientCallbackHandler (
702705 (HQUIC )Connection ,
@@ -3087,20 +3090,9 @@ QuicConnProcessPeerTransportParameters(
30873090 & Connection -> Streams ,
30883091 Connection -> PeerTransportParams .InitialMaxBidiStreams ,
30893092 Connection -> PeerTransportParams .InitialMaxUniStreams ,
3090- FromResumptionTicket );
3093+ ! FromResumptionTicket );
30913094
3092- if (FromResumptionTicket ) {
3093- //
3094- // Defer the datagram state change notification to avoid reentrant
3095- // callbacks when called from the resumption ticket path.
3096- //
3097- QUIC_OPERATION * Oper ;
3098- if ((Oper = QuicConnAllocOperation (Connection , QUIC_OPER_TYPE_DATAGRAM_STATE_CHANGED )) != NULL ) {
3099- QuicConnQueueOper (Connection , Oper );
3100- }
3101- } else {
3102- QuicDatagramOnSendStateChanged (& Connection -> Datagram );
3103- }
3095+ QuicDatagramOnSendStateChanged (& Connection -> Datagram );
31043096
31053097 if (Connection -> State .Started ) {
31063098 if (Connection -> State .Disable1RttEncrytion &&
@@ -7970,20 +7962,6 @@ QuicConnDrainOperations(
79707962 Connection , Oper -> ROUTE .PhysicalAddress , Oper -> ROUTE .PathId , Oper -> ROUTE .Succeeded );
79717963 break ;
79727964
7973- case QUIC_OPER_TYPE_STREAMS_AVAILABLE :
7974- if (Connection -> State .ShutdownComplete ) {
7975- break ; // Ignore if already shutdown
7976- }
7977- QuicStreamSetIndicateStreamsAvailable (& Connection -> Streams );
7978- break ;
7979-
7980- case QUIC_OPER_TYPE_DATAGRAM_STATE_CHANGED :
7981- if (Connection -> State .ShutdownComplete ) {
7982- break ; // Ignore if already shutdown
7983- }
7984- QuicDatagramOnSendStateChanged (& Connection -> Datagram );
7985- break ;
7986-
79877965 default :
79887966 CXPLAT_FRE_ASSERT (FALSE);
79897967 break ;
0 commit comments