File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -159,12 +159,12 @@ export class Polling extends Transport {
159159
160160 const onEnd = ( buffer ) => {
161161 this . onData ( buffer . toString ( ) ) ;
162- this . dataReq = this . dataRes = null ;
162+ this . onDataRequestCleanup ( ) ;
163163 res . end ( "ok" ) ;
164164 } ;
165165
166166 res . onAborted ( ( ) => {
167- this . dataReq = this . dataRes = null ;
167+ this . onDataRequestCleanup ( ) ;
168168 this . onError ( "data request connection closed prematurely" ) ;
169169 } ) ;
170170
@@ -190,7 +190,7 @@ export class Polling extends Transport {
190190 if ( totalLength != contentLengthHeader ) {
191191 this . onError ( "content-length mismatch" ) ;
192192 res . writeStatus ( "400 content-length mismatch" ) . end ( ) ;
193- this . dataReq = this . dataRes = null ;
193+ this . onDataRequestCleanup ( ) ;
194194 return ;
195195 }
196196 onEnd ( buffer ) ;
@@ -201,6 +201,15 @@ export class Polling extends Transport {
201201 } ) ;
202202 }
203203
204+ /**
205+ * Cleanup onDataRequest.
206+ *
207+ * @api private
208+ */
209+ onDataRequestCleanup ( ) {
210+ this . dataReq = this . dataRes = null ;
211+ }
212+
204213 /**
205214 * Processes the incoming data payload.
206215 *
You can’t perform that action at this time.
0 commit comments