Skip to content

Commit

Permalink
move scattered message to redis message
Browse files Browse the repository at this point in the history
  • Loading branch information
fastio committed Jun 16, 2019
1 parent fdbe05e commit c0f795d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions transport/redis_server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ public:
struct result {
result(redis::redis_message&& m) : _data(make_foreign(std::make_unique<redis::redis_message>(std::move(m)))) {}
foreign_ptr<std::unique_ptr<redis::redis_message>> _data;
lw_shared_ptr<scattered_message<char>> make_message() {
auto m = seastar::make_lw_shared<scattered_message<char>> ();
for (auto&& fragment : _data->ostream().fragments()) {
m->append_static(reinterpret_cast<const char*>(fragment.data()), fragment.size());
}
return m;
inline lw_shared_ptr<scattered_message<char>> make_message() {
return _data->message();
}
};
using response_type = result;
Expand Down

0 comments on commit c0f795d

Please sign in to comment.