Commit 38075741 authored by Tobias Steiner's avatar Tobias Steiner
Browse files

Check if the answer is already sent

parent 3742a3b6
......@@ -83,7 +83,7 @@ export class ApiController {
// we should use rxjs here
kafkaEventEmitter.on(`data-${id}`, (data: InterfaceStreamAppResponse) => {
responseData.add(data);
if (responseData.finished()) {
if (responseData.finished() && !answered) {
answered = true;
return res.send(responseData.getData());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment