File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/firestore/src/platform/node Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -230,15 +230,17 @@ export class GrpcConnection implements Connection {
230
230
} ) ;
231
231
232
232
grpcStream . on ( 'error' , ( grpcError : ServiceError ) => {
233
- logWarn (
234
- LOG_TAG ,
235
- 'GRPC stream error. Code:' ,
236
- grpcError . code ,
237
- 'Message:' ,
238
- grpcError . message
239
- ) ;
240
- const code = mapCodeFromRpcCode ( grpcError . code ) ;
241
- close ( new FirestoreError ( code , grpcError . message ) ) ;
233
+ if ( ! closed ) {
234
+ logWarn (
235
+ LOG_TAG ,
236
+ 'GRPC stream error. Code:' ,
237
+ grpcError . code ,
238
+ 'Message:' ,
239
+ grpcError . message
240
+ ) ;
241
+ const code = mapCodeFromRpcCode ( grpcError . code ) ;
242
+ close ( new FirestoreError ( code , grpcError . message ) ) ;
243
+ }
242
244
} ) ;
243
245
244
246
logDebug ( LOG_TAG , 'Opening GRPC stream' ) ;
You can’t perform that action at this time.
0 commit comments