Commit d85b55d6 authored by Jakob Otto's avatar Jakob Otto

Fix bug in transport_worker

parent 7ab1ebec
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
} }
template <class Parent> template <class Parent>
void handle_data(Parent& parent, span<byte> data) { void handle_data(Parent& parent, span<const byte> data) {
application_.handle_data(parent, data); application_.handle_data(parent, data);
} }
......
...@@ -173,9 +173,7 @@ CAF_TEST(construction and initialization) { ...@@ -173,9 +173,7 @@ CAF_TEST(construction and initialization) {
} }
CAF_TEST(handle_data) { CAF_TEST(handle_data) {
auto test_span = make_span(reinterpret_cast<byte*>( auto test_span = as_bytes(make_span(hello_test));
const_cast<char*>(hello_test.data())),
hello_test.size());
worker.handle_data(transport, test_span); worker.handle_data(transport, test_span);
auto& buf = application_results->data_buffer; auto& buf = application_results->data_buffer;
string_view result{reinterpret_cast<char*>(buf.data()), buf.size()}; string_view result{reinterpret_cast<char*>(buf.data()), buf.size()};
......
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