mirror of
https://github.com/moparisthebest/davmail
synced 2025-03-04 11:19:43 -05:00
LDAP: cancel search threads on connection close, not request end
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1679 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
a830470398
commit
064708cff0
@ -485,6 +485,12 @@ public class LdapConnection extends AbstractConnection {
|
||||
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT"), e2);
|
||||
}
|
||||
} finally {
|
||||
// cancel all search threads
|
||||
synchronized (searchThreadMap) {
|
||||
for (SearchRunnable searchRunnable:searchThreadMap.values()) {
|
||||
searchRunnable.abandon();
|
||||
}
|
||||
}
|
||||
close();
|
||||
}
|
||||
DavGatewayTray.resetIcon();
|
||||
@ -583,13 +589,6 @@ public class LdapConnection extends AbstractConnection {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT"), e2);
|
||||
}
|
||||
throw e;
|
||||
} finally {
|
||||
// cancel all search threads
|
||||
synchronized (searchThreadMap) {
|
||||
for (SearchRunnable searchRunnable:searchThreadMap.values()) {
|
||||
searchRunnable.abandon();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user