Commit 2cc85236 authored by Dominik Charousset's avatar Dominik Charousset

Add sanity checks

parent be755881
...@@ -59,6 +59,7 @@ void stream_manager::handle(inbound_path*, downstream_msg::forced_close& x) { ...@@ -59,6 +59,7 @@ void stream_manager::handle(inbound_path*, downstream_msg::forced_close& x) {
bool stream_manager::handle(stream_slots slots, upstream_msg::ack_open& x) { bool stream_manager::handle(stream_slots slots, upstream_msg::ack_open& x) {
CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(x)); CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(x));
CAF_ASSERT(x.desired_batch_size > 0);
auto ptr = out().path(slots.receiver); auto ptr = out().path(slots.receiver);
if (ptr == nullptr) if (ptr == nullptr)
return false; return false;
...@@ -83,6 +84,7 @@ bool stream_manager::handle(stream_slots slots, upstream_msg::ack_open& x) { ...@@ -83,6 +84,7 @@ bool stream_manager::handle(stream_slots slots, upstream_msg::ack_open& x) {
void stream_manager::handle(stream_slots slots, upstream_msg::ack_batch& x) { void stream_manager::handle(stream_slots slots, upstream_msg::ack_batch& x) {
CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(x)); CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(x));
CAF_ASSERT(x.desired_batch_size > 0);
auto path = out().path(slots.receiver); auto path = out().path(slots.receiver);
if (path != nullptr) { if (path != nullptr) {
path->open_credit += x.new_capacity; path->open_credit += x.new_capacity;
......
Markdown is supported
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