You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2022/04/09 11:56:57 UTC
[GitHub] [mina-sshd] tomaswolf opened a new pull request, #216: Clean up service support
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf merged pull request #216: Clean up service support
Posted by GitBox <gi...@apache.org>.
tomaswolf merged PR #216:
URL: https://github.com/apache/mina-sshd/pull/216
--
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-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org