Skip to content

TCPConnection.cc active_close #1

@Tusen183

Description

@Tusen183

Code in TCPConnection.cc:144

void TCPConnection::clean_shutdown() {

        if (_receiver.stream_out().input_ended()) {
            if (!_sender.stream_in().eof())
                _linger_after_streams_finish = false;
            else if (_sender.bytes_in_flight() == 0) {
                if (!_linger_after_streams_finish || time_since_last_segment_received() >= 10 * _cfg.rt_timeout) {
                    _active = false;
                }
            }
        }
    }

Q:_linger_after_streams_finish marks that the Tcp connection has entered the TIME-WAIT state and requires waiting for a certain amount of time to close. The conditions here don't seem quite right?

  if (!_linger_after_streams_finish || time_since_last_segment_received() >= 10 *_cfg.rt_timeout) {
                _active = false;`
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions