Skip to content

Commit

Permalink
[openhabcloud] Reconnection Fixes (openhab#14251) upstream commit 9ba…
Browse files Browse the repository at this point in the history
  • Loading branch information
dfdenorr committed Feb 9, 2023
1 parent 020275b commit 5682b1b
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
Expand All @@ -51,14 +52,14 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.socket.backo.Backoff;
import io.socket.client.IO;
import io.socket.client.IO.Options;
import io.socket.client.Manager;
import io.socket.client.Socket;
import io.socket.emitter.Emitter;
import io.socket.engineio.client.Transport;
import io.socket.engineio.client.transports.WebSocket;
import io.socket.parser.Packet;
import io.socket.parser.Parser;
import okhttp3.OkHttpClient.Builder;
import okhttp3.logging.HttpLoggingInterceptor;
import okhttp3.logging.HttpLoggingInterceptor.Level;
Expand Down Expand Up @@ -268,16 +269,11 @@ public void call(Object... args) {
onEvent("cancel", (JSONObject) args[0]);
}
}).on("command", new Emitter.Listener() {

if (packetTypeIndex < Parser.types.length) {
type = Parser.types[packetTypeIndex];
} else {
type = "<unknown type>";
}
}
logger.trace("Socket.IO Packet: {} ({})", type, packetTypeIndex);
})//
;
@Override
public void call(Object... args) {
onEvent("command", (JSONObject) args[0]);
}
});

//
// socket events
Expand Down

0 comments on commit 5682b1b

Please sign in to comment.