Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
write_event();
}
+void Protocol::reset_write()
+{
+ assert(write_state != write_state_t::open);
+ conn.out_seq = 0;
+ conn.out_q.clear();
+ conn.sent.clear();
+ need_keepalive = false;
+ keepalive_ack = std::nullopt;
+}
+
seastar::future<stop_t> Protocol::do_write_dispatch_sweep()
{
switch (write_state) {
void notify_keepalive_ack(utime_t keepalive_ack);
+ void reset_write();
+
bool is_queued() const {
return (!conn.out_q.empty() ||
need_keepalive ||
if (full) {
client_cookie = generate_client_cookie();
peer_global_seq = 0;
- conn.out_seq = 0;
- // TODO:
- // discard_out_queue();
- // message_seq = 0;
- // ack_left = 0;
+ reset_write();
seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_remote_reset(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()))