Skip to content

Commit 95d5ca3

Browse files
committed
Revert making example app unsubscribe/disconnect
Following Danielle's feedback: https://github.com/pusher/pusher-websocket-java/pull/247/files#r402989472
1 parent 9c8bf51 commit 95d5ca3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/main/java/com/pusher/client/example/PrivateEncryptedChannelExampleApp.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,9 @@ private PrivateEncryptedChannelExampleApp(final String[] args) {
4242
channel = pusher.subscribePrivateEncrypted(channelName, this, eventName);
4343

4444
// Keep main thread asleep while we watch for events or application will terminate
45-
for (int i = 0; ; i++) {
45+
while (true) {
4646
try {
47-
Thread.sleep(5000);
48-
pusher.disconnect(); // to test clearing of shared secret (via tmp log)
49-
pusher.connect(this);
50-
Thread.sleep(5000);
51-
pusher.unsubscribe(channelName); // to test clearing of shared secret (via tmp log)
52-
if (i % 2 == 0) { // to test disconnect on both unsubscribed/subscribed
53-
channel = pusher.subscribePrivateEncrypted(channelName, this, eventName);
54-
}
47+
Thread.sleep(1000);
5548
}
5649
catch (final InterruptedException e) {
5750
e.printStackTrace();

0 commit comments

Comments
 (0)