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

ASIOSession fails to gracefully teardown sockets

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 3.6.4, 3.7.1
    • 3.6.0, 3.6.1
    • Networking
    • None
    • Fully Compatible
    • v3.6
    • Platforms 2018-01-15

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: