Skip to content

Commit 22ffb27

Browse files
committed
squash. make connectivity check stronger
1 parent 38b6ac9 commit 22ffb27

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

irods/src/main/java/ch/cyberduck/core/irods/IRODSSession.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public IRODSSession(final Host h, final X509TrustManager trust, final X509KeyMan
7272
super(h, trust, key);
7373
}
7474

75+
@Override
76+
public boolean isConnected() {
77+
return super.isConnected() && null != client && client.isConnected();
78+
}
79+
7580
@Override
7681
protected IRODSConnection connect(final ProxyFinder proxy, final HostKeyCallback key, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException {
7782
try {
@@ -136,7 +141,7 @@ protected void logout() {
136141
@Override
137142
protected void disconnect() {
138143
try {
139-
if(client != null) {
144+
if(null != client) {
140145
client.disconnect();
141146
client = null;
142147
log.debug("disconnected from iRODS server.");
@@ -145,6 +150,8 @@ protected void disconnect() {
145150
catch(Exception e) {
146151
log.error(e.getMessage());
147152
}
153+
154+
super.disconnect();
148155
}
149156

150157
@Override

0 commit comments

Comments
 (0)