tomaswolf opened a new pull request, #216:
URL: https://github.com/apache/mina-sshd/pull/216

   Previous code declared a `SessionHelper.sessionLock` and used it in
   `AbstractSession` around `doHandleMessage()` and in `ClientSessionImpl`
   to partially guard service-related info (the service names and the next
   service) against concurrent accesses.
   
   The use of this `sessionLock` around handling messages was a way to
   synchronize access to the `currentService` field.
   
   Encapsulate the current service in a synchronized per-session
   `CurrentService` object. In `ClientSessionImpl`, install a customized
   object that also can handle switching the service (from authentication
   to connections), and set the `initialRequestSent` flag atomically.
   
   Message handling is serialized per session already via the `decodeLock`.
   Remove the locking in `AbstractSession.handleMessage()`.
   
   Note that like previous code `AbstractServerSession.startService()`
   actually does _not_ call `start()` on the service. This looks like an
   oversight, but doing so leads to flaky tests in my test runs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to