Skip to content

Commit 5d16940

Browse files
committed
ADAP-205: fix connectionListener
1 parent 4af3de3 commit 5d16940

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/test/java/com/openfin/desktop/ChannelTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,11 @@ public void onClientDisconnect(ChannelClientConnectEvent connectionEvent) {
250250
}
251251
});
252252
desktopConnection.getChannel(channelName).connectAsync().thenAccept(client -> {
253-
client.addChannelListener(new ChannelListener() {
254-
@Override
255-
public void onChannelConnect(ConnectionEvent connectionEvent) {
256-
}
257-
@Override
258-
public void onChannelDisconnect(ConnectionEvent connectionEvent) {
253+
client.disconnect().thenAccept(ack -> {
254+
if (ack.isSuccessful()) {
259255
latch.countDown();
260256
}
261257
});
262-
client.disconnect();
263258
});
264259
});
265260

0 commit comments

Comments
 (0)