File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,11 @@ class QUICClient {
393393 * Registered only if the socket is encapsulated.
394394 */
395395 protected handleEventQUICSocket = ( evt : EventAll ) => {
396- if ( evt . detail instanceof AbstractEvent ) {
396+ if (
397+ evt . detail instanceof AbstractEvent &&
398+ // Avoid cloning the `EventQUICConnectionSend` event as it's very low level
399+ ! ( evt . detail instanceof events . EventQUICConnectionSend )
400+ ) {
397401 this . dispatchEvent ( evt . detail . clone ( ) ) ;
398402 }
399403 } ;
Original file line number Diff line number Diff line change @@ -229,7 +229,11 @@ class QUICConnection {
229229 * Handles all `EventQUICStream` events.
230230 */
231231 protected handleEventQUICStream = ( evt : EventAll ) => {
232- if ( evt . detail instanceof AbstractEvent ) {
232+ if (
233+ evt . detail instanceof AbstractEvent &&
234+ // Avoid cloning the `EventQUICStreamSend` event as it's very low level
235+ ! ( evt . detail instanceof events . EventQUICStreamSend )
236+ ) {
233237 this . dispatchEvent ( evt . detail . clone ( ) ) ;
234238 }
235239 } ;
Original file line number Diff line number Diff line change @@ -168,7 +168,11 @@ class QUICServer {
168168 * Handles all `EventQUICConnection` events.
169169 */
170170 protected handleEventQUICConnection = ( evt : EventAll ) => {
171- if ( evt . detail instanceof AbstractEvent ) {
171+ if (
172+ evt . detail instanceof AbstractEvent &&
173+ // Avoid cloning the `EventQUICConnectionSend` event as it's very low level
174+ ! ( evt . detail instanceof events . EventQUICConnectionSend )
175+ ) {
172176 this . dispatchEvent ( evt . detail . clone ( ) ) ;
173177 }
174178 } ;
You can’t perform that action at this time.
0 commit comments