Skip to content

Commit ca0a173

Browse files
committed
Removed all questions from the code since they are mostly for my understanding, and the code should work properly due to copy-paste reasons
Check the request payload is not sent twice RequestResponseRequesterBase
1 parent ce0bcb5 commit ca0a173

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/automata/RequestResponseRequester.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ void RequestResponseRequesterBase::subscribe(Subscriber<Payload>& subscriber) {
1212
// FIXME
1313
// Subscriber::onSubscribe is delivered externally, as it may attempt to
1414
// synchronously deliver Subscriber::request.
15-
// Q: why do we want to avoid Subscriber::request being delivered
16-
// synchronously?
1715
}
1816

1917
void RequestResponseRequesterBase::onNext(Payload request) {
@@ -26,6 +24,8 @@ void RequestResponseRequesterBase::onNext(Payload request) {
2624
break;
2725
}
2826
case State::REQUESTED:
27+
// Cannot receive a request payload twice.
28+
CHECK(false);
2929
break;
3030
case State::CLOSED:
3131
break;
@@ -68,8 +68,6 @@ void RequestResponseRequesterBase::endStream(StreamCompletionSignal signal) {
6868
case State::CLOSED:
6969
break;
7070
}
71-
// Q: don't really understand what the comment below means or if it applies
72-
// in this case as well?
7371
// FIXME: switch on signal and verify that callsites propagate stream errors
7472
consumingSubscriber_.onComplete();
7573
}

0 commit comments

Comments
 (0)