mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
SMACK-442 Manager should also handle connectionClosedOnError()
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_2@13784 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
aa5906f1f1
commit
032fc8626e
2 changed files with 12 additions and 0 deletions
|
@ -102,10 +102,16 @@ public class InBandBytestreamManager implements BytestreamManager {
|
||||||
// register shutdown listener
|
// register shutdown listener
|
||||||
connection.addConnectionListener(new AbstractConnectionListener() {
|
connection.addConnectionListener(new AbstractConnectionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void connectionClosed() {
|
public void connectionClosed() {
|
||||||
manager.disableService();
|
manager.disableService();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void connectionClosedOnError(Exception e) {
|
||||||
|
manager.disableService();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,10 +96,16 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
||||||
// register shutdown listener
|
// register shutdown listener
|
||||||
connection.addConnectionListener(new AbstractConnectionListener() {
|
connection.addConnectionListener(new AbstractConnectionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void connectionClosed() {
|
public void connectionClosed() {
|
||||||
manager.disableService();
|
manager.disableService();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void connectionClosedOnError(Exception e) {
|
||||||
|
manager.disableService();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue