Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4287

Socket.IOControl handles Windows-specific control codes and is not supported on this platform.

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.18.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change

      We are running a mission-critical application in a Linux container and PlatformNotSupported is being thrown frequently. 

      Looking at C# Driver code, seems we are first trying socket.IOControl and if an exception happens, we try socket.SetSocketOption (reference), but according to .Net Runtime code, this would always be the case (reference), as IOControlCode KeepAlive is only supported for windows (reference)

      For top performance, shouldn't we check for Platform in order to switch between IOControl or SetSocketOption methods?

       

            Assignee:
            james.kovacs@mongodb.com James Kovacs
            Reporter:
            kaio3henriquemelo@gmail.com Kaio Henrique
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: