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 {
192192 // In a real-world application, the "callback" function should be executed
193193 // with payload sent back from the responder. Here, we'll simply simulate (5 seconds delay)
194194 // 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 );
196202
197203 return () => console .log (' teardown' );
198204 }
You can’t perform that action at this time.
0 commit comments