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

SocketTimeout not honored with Async reads

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.1, 2.1
    • Component/s: Connectivity
    • None
    • Environment:
      Windows

      As a workaround to the infinite hanging on tailable cursors during an Azure VIP swap, CSHARP-775 suggests to change SocketTimeout. But it appears that this is no longer working with 2.x Async driver as the code merely sets the ReadTimeout of the underlying NetworkStream, which is ignored for Async reads. (see https://msdn.microsoft.com/en-us/library/bk6w7hs8%28v=vs.110%29.aspx which indicates: "This property does not affect asynchronous reads performed by calling the BeginRead method").

      It appears the Async Connection code manually sets a timer to apply the a connection timeout, but does not do anything similar for async reads. Thus the SocketTimeout setting seems to be completely broken at the moment.

            Assignee:
            Unassigned Unassigned
            Reporter:
            katoa Brian Anderton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: