You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for tcp.SetLinger() says;
If sec < 0 (the default), Close returns immediately and the operating system finishes
sending the data in the background.
This seems to make a promise which is rarely true. Indeed, it seems that the
expectation is that if the operating system supports this it works, but the operating
systems I've seen don't do this.
Instead, the Close() behavior seems to be that the operating system may discard unset
data. And indeed that's what I've seen. I recommend the wording be changed to say:
If sec < 0; Close returns immediately. The operating system may attempt to continue
to send data in the background, or the unset or unacknowledged data may be discarded.
The text was updated successfully, but these errors were encountered:
If you have concrete evidence about the claim being false, please let me know. The
report is too vague to support changing the docs. You might also want to read
golang.org/s/linger.
by garrett@damore.org:
The text was updated successfully, but these errors were encountered: