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

ASIOSession fails to gracefully teardown sockets

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 3.6.0, 3.6.1
    • Fix Version/s: 3.6.4, 3.7.1
    • Component/s: Networking
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.6
    • Sprint:
      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

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

              Dates

              Created:
              Updated:
              Resolved: