Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify tcp linger option #2019

Closed
wants to merge 4 commits into from
Closed

clarify tcp linger option #2019

wants to merge 4 commits into from

Conversation

vans163
Copy link
Contributor

@vans163 vans163 commented Nov 16, 2018

This updates the documentation because the current is very confusing.

@CLAassistant
Copy link

CLAassistant commented Nov 16, 2018

CLA assistant check
All committers have signed the CLA.

@essen
Copy link
Contributor

essen commented Nov 16, 2018

Right but now it's missing the info about the timeout being ignored when the first element is false.

@vans163
Copy link
Contributor Author

vans163 commented Nov 16, 2018

right yea

@IngelaAndin IngelaAndin added the team:PS Assigned to OTP team PS label Nov 18, 2018
@bmk
Copy link
Contributor

bmk commented Dec 12, 2018

Hi,

After some discussions, we have a proposal to make the three
'linger' alternatives more clear. See below:

/BMK


The first component is if linger is enabled, the second component
is the flushing time-out, in seconds. There are 3 alternatives:

1) {false, _}
   close/1 or shutdown/2 returns immediately, not waiting for data to
   be flushed, with closing happening in the background.
2) {true,  0}
   Aborts the connection when it is closed.
   Discards any data still remaining in the send buffers and sends RST
   to the peer.
   This avoids TCP's TIME_WAIT state, but leaves open the possibility
   that another "incarnation" of this connection being created.
3) {true,  Time} when Time > 0
   close/1 or shutdown/2 will not return until all queued messages for
   the socket have been successfully sent or the linger timeout (Time)
   has been reached.

@bmk
Copy link
Contributor

bmk commented Jan 10, 2019

HI,

I have now merged our proposal into master.

Regards,
/BMK

@bmk bmk closed this Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants