DIRAPI-342: Unbind/close breaks connection
authorStefan Seelmann <mail@stefan-seelmann.de>
Sun, 26 May 2019 20:52:44 +0000 (22:52 +0200)
committerStefan Seelmann <mail@stefan-seelmann.de>
Sun, 26 May 2019 20:52:44 +0000 (22:52 +0200)
commit125889b6e094be7659f9f448027e79029dcfa890
tree46f07dfa39fc8e99438f290d7a627647d0e07cae
parent895607e96f14c8f7371b4996f8340af12decd2c9
DIRAPI-342: Unbind/close breaks connection

* Fix race condition in `sessionClosed()` callback: make synchronized and check if same session is closed
* Fix race condition in `setCloseListener()` callback: make synchronized and check if same session is closed
* Move duplicated code from `unbind()` and `sessionClosed()` to `close()`
* Remove `connected` flag, use information from session instead
* Remove no longer required lock
* Reuse isConnected() method where possible
ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java