Bug 25246 - Socket.Disconnect() does not respect reuse parameter
Summary: Socket.Disconnect() does not respect reuse parameter
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 3.8.0
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-12-10 17:27 UTC by Craig Minihan
Modified: 2014-12-10 17:27 UTC (History)
1 user (show)

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


Description Craig Minihan 2014-12-10 17:27:31 UTC
The System.Net.Sockets.Socket.Disconnect(bool reuseSocket) method delegates to Disconnect_internal() which is mapped to ves_icall_System_Net_Sockets_Socket_Disconnect_internal() in socket-io.c.

This function takes the MonoBoolean reuse parameter but does not use it. The DisconnectEx and TransmitFileEx are always invoked with the TF_REUSE_SOCKET flag which suggests that when reuse is false the socket will be reused anyway.

I noticed this problem when investigating a socket related issue which now looks like an application problem. So I do not know if the is genuinely a defect at this point, however the LOGDEBUG message in the function suggests that the reuse parameter is significant.

Note You need to log in before you can comment on or make changes to this bug.