File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,13 @@ class GoogleCloudPubSubClient extends ClientProxy {
192
192
// In a real-world application, the "callback" function should be executed
193
193
// with payload sent back from the responder. Here, we'll simply simulate (5 seconds delay)
194
194
// that response came through by passing the same "data" as we've originally passed in.
195
- setTimeout (() => callback ({ response: packet .data }), 5000 );
195
+ //
196
+ // The "isDisposed" bool on the WritePacket tells the response that no further data is
197
+ // expected. If not sent or is false, this will simply emit data to the Observable.
198
+ setTimeout (() => callback ({
199
+ response: packet .data ,
200
+ isDisposed: true ,
201
+ }), 5000 );
196
202
197
203
return () => console .log (' teardown' );
198
204
}
You can’t perform that action at this time.
0 commit comments