Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.0.2
-
Windows 7, Visual Studio 2008 SP1
Description
When starting a client or server in this environment an exception is thrown and the socket closes with the following stack - this stops everything:
System.Net.Sockets.SocketException: An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
at Etch.Util.TcpTransport.SetUpSocket() in c:\BambooAgent\xml-data\build-dir\ETCH-RELEASE\binding-csharp\runtime\src\main\csharp\Etch\Util\TcpTransport.cs:line 193
at Etch.Util.Connection`1.Run0(Boolean first) in c:\BambooAgent\xml-data\build-dir\ETCH-RELEASE\binding-csharp\runtime\src\main\csharp\Etch\Util\Connection.cs:line 116
Fix:
In TcpTransport, a call is made to SetSocketOption with SocketOptionLevel.Tcp set. The correct SocketOptionLevel is .Socket, and this will fix the issue. By setting it to .Tcp, the socket sends a SO_BROADCAST which is invalid for TCP.