Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32477

ASIOSession fails to gracefully teardown sockets

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.6.4, 3.7.1
    • Affects Version/s: 3.6.0, 3.6.1
    • Component/s: Networking
    • None
    • Fully Compatible
    • v3.6
    • Platforms 2018-01-15

      In the cleanup handler of ServiceStateMachine we depend on socket teardown to occur as part of the destruction of a Session instance, however ASIOSession omits a dtor and leaves the job up to asio. Unfortunately, while this results in actually closing the socket, it does not do so gracefully, leaving the client side guessing what the current state is only to find a ECONNRESET on subsequent attempts to write. ASIOSession has most of the complete implementation for graceful shutdown in its shutdown method (notably omitting an explicit call to close the sockets), and everything behaves as expected if that's called in the ASIOSession dtor.

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: