@@ -43,11 +43,11 @@ export class ConnManager {
4343 conns : Conn [ ] = [ ] ;
4444 currPingId = 0 ;
4545 subscriptionIds : Record < number , number > = { } ;
46- SignOnRequests : Record < number , LooseType [ ] > = { } ;
47- OnPingCallback : ( id : number ) => void ;
48- OnSignReqResp : Record < number , LooseType > = { } ;
49- OnSignOnResponse : ( reqId : number , isFin : boolean , data : Uint8Array ) => void ;
50- OnPushResponse : ( frame : LegyH2PushFrame ) => void ;
46+ signOnRequests : Record < number , LooseType [ ] > = { } ;
47+ onPingCallback : ( id : number ) => void ;
48+ onSignReqResp : Record < number , LooseType > = { } ;
49+ onSignOnResponse : ( reqId : number , isFin : boolean , data : Uint8Array ) => void ;
50+ onPushResponse : ( frame : LegyH2PushFrame ) => void ;
5151 _eventSynced = false ;
5252 _pingInterval = 30 ;
5353 authToken : string | null = null ;
@@ -58,9 +58,9 @@ export class ConnManager {
5858
5959 constructor ( base : BaseClient ) {
6060 this . client = base ;
61- this . OnPingCallback = this . _OnPingCallback . bind ( this ) ;
62- this . OnSignOnResponse = this . _OnSignOnResponse . bind ( this ) ;
63- this . OnPushResponse = this . _OnPushResponse . bind ( this ) ;
61+ this . onPingCallback = this . _OnPingCallback . bind ( this ) ;
62+ this . onSignOnResponse = this . _OnSignOnResponse . bind ( this ) ;
63+ this . onPushResponse = this . _OnPushResponse . bind ( this ) ;
6464 this . opStream = this . createAsyncReadableStream < Operation > ( ) ;
6565 this . sqStream = this . createAsyncReadableStream < SquareEvent > ( ) ;
6666 }
@@ -142,6 +142,7 @@ export class ConnManager {
142142 initServices = [ 3 , 6 , 8 , 9 , 10 ] ,
143143 ) : Promise < Conn > {
144144 const _conn = new Conn ( this ) ;
145+ this . signOnRequests = { } ;
145146 if ( state === 1 ) {
146147 this . conns [ 0 ] = _conn ;
147148 this . authToken = this . client . authToken ! ;
@@ -175,7 +176,7 @@ export class ConnManager {
175176 ) : Promise < { payload : Uint8Array < ArrayBuffer > ; id : number ; } > {
176177 this . log ( "buildAndSendSignOnRequest" , { serviceType, kwargs } ) ;
177178 const cl = this . client ;
178- const id = Object . keys ( this . SignOnRequests ) . length + 1 ;
179+ const id = Object . keys ( this . signOnRequests ) . length + 1 ;
179180 const idBuf = new Uint8Array ( 2 ) ;
180181 idBuf [ 0 ] = ( id >> 8 ) & 0xff ;
181182 idBuf [ 1 ] = id & 0xff ;
@@ -207,7 +208,7 @@ export class ConnManager {
207208 header [ 4 ] = ( req . length >> 8 ) & 0xff ;
208209 header [ 5 ] = req . length & 0xff ;
209210 header . set ( req , 6 ) ;
210- this . SignOnRequests [ id ] = [ serviceType , methodName , null ] ;
211+ this . signOnRequests [ id ] = [ serviceType , methodName , null ] ;
211212 this . log (
212213 `[H2][PUSH] send sign-on-request. requestId:${ id } , service:${ serviceType } ` ,
213214 ) ;
@@ -222,11 +223,11 @@ export class ConnManager {
222223 ) : Promise < false | undefined > {
223224 // data = data.slice(5);
224225 const cl = this . client ;
225- if ( ! ( reqId in this . SignOnRequests ) ) {
226+ if ( ! ( reqId in this . signOnRequests ) ) {
226227 this . log ( `[PUSH] unknown sign-on-response requestId:${ reqId } ` ) ;
227228 return ;
228229 }
229- const entry = this . SignOnRequests [ reqId ] ;
230+ const entry = this . signOnRequests [ reqId ] ;
230231 const serviceType : number = entry [ 0 ] ;
231232 const methodName : string | undefined = entry [ 1 ] ;
232233
0 commit comments