-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
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.