Bug 4009 - setsockopt appears to set TCP_NODELAY even if socket.NoDelay = false
Summary: setsockopt appears to set TCP_NODELAY even if socket.NoDelay = false
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-03-21 11:12 UTC by Neale Ferguson
Modified: 2017-07-07 18:35 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Neale Ferguson 2012-03-21 11:12:57 UTC
A program using TCP sockets is setting socket.NoDelay to false. Yet when the code in Socket_2_1.cs executes the code:

 SetSocketOption (
       SocketOptionLevel.Tcp,
       SocketOptionName.NoDelay, value ? 1 : 0);

The C code which implements the setsockopt() call ends up setting that option on.I've verified that value is 0 at the time of the call to SetSocketOption().
Comment 1 Miguel de Icaza [MSFT] 2012-09-02 13:31:02 UTC
Neale, do you mind sharing a test case and the paltform this is happening on?
Comment 2 Rodrigo Kumpera 2014-01-17 18:00:24 UTC
Why is that wrong? Setting NoDelay to false should trigger a call to setsockopt with zero as value.
Comment 3 Ludovic Henry 2017-07-07 18:35:18 UTC
If you can still reproduce with latest mono version, please feel free to reopen the bug. Thank you.