File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
plugins/devtool/renderer/devtool/services Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010import { ICDPMessageDispatcher } from '../types' ;
1111import { IDebugDriver } from '@lynx-js/devtool-plugin-core/renderer' ;
1212
13- const MAX_MESSAGE_POOL_SIZE = 100 ;
13+ const MAX_MESSAGE_POOL_SIZE = 1000 ;
1414
1515class CDPMessageDispatcher implements ICDPMessageDispatcher {
1616 private _callbackMap : Map < string , ( message : ICustomDataWrapper < ECustomDataType . CDP > ) => void > = new Map ( ) ;
@@ -58,7 +58,8 @@ class CDPMessageDispatcher implements ICDPMessageDispatcher {
5858 clientPool [ sessionId ] = [ ] ;
5959 }
6060 if ( clientPool [ sessionId ] . length >= MAX_MESSAGE_POOL_SIZE ) {
61- clientPool [ sessionId ] . shift ( ) ;
61+ const droppedMessage = clientPool [ sessionId ] . shift ( ) ;
62+ console . warn ( 'CDP message pool is full, dropping message: ' , droppedMessage ) ;
6263 }
6364 clientPool [ sessionId ] . push ( message ) ;
6465 }
You can’t perform that action at this time.
0 commit comments