Skip to content

Commit

Permalink
transport::cql_server::connection::process(): Consume the last future
Browse files Browse the repository at this point in the history
When process() terminated _ready_to_respond contains the future with the
state of the last I/O operation of this connection. Consume it at the
end of process().

Fixes issue #44

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
  • Loading branch information
Vlad Zolotarov authored and avikivity committed Aug 2, 2015
1 parent 0ef1fac commit 86e28bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion transport/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ class cql_server::connection {
, _client_state(service::client_state::for_external_calls())
{ }
future<> process() {
return do_until([this] { return _read_buf.eof(); }, [this] { return process_request(); });
return do_until([this] { return _read_buf.eof(); }, [this] { return process_request(); })
.finally([this] { return std::move(_ready_to_respond); });
}
future<> process_request();
private:
Expand Down

0 comments on commit 86e28bb

Please sign in to comment.