Skip to content
Snippets Groups Projects
Commit 0a6701ff authored by Richard Alam's avatar Richard Alam
Browse files

Have only one ESL listener

 - on auto-reconnect when FS restarts, the auto-reconnect add another
   listener to the ESL client resulting in multiple handlers of ESL events
   and multiple messages to akka-apps. This resulted in multiple recordings
   of audio when the first user joins as akka-apps receives 2 user join events.
parent dd6d58b3
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,12 @@ public class ConnectionManager {
this.manager = connManager;
this.eslEventListener = eventListener;
this.conferenceEventListener = confListener;
// Set up listener here. Before it was inside connect()
// but on auto-reconnect, another listener is added
// increasing the number of listeners causing duplicate
// messages to akka-apps (ralam Oct 10, 2019)
Client c = manager.getESLClient();
c.addEventListener(eslEventListener);
}
private void connect() {
......@@ -75,7 +81,6 @@ public class ConnectionManager {
if (!subscribed) {
log.info("Subscribing for ESL events.");
c.cancelEventSubscriptions();
c.addEventListener(eslEventListener);
c.setEventSubscriptions("plain", "all");
//c.addEventFilter(EVENT_NAME, "heartbeat");
c.addEventFilter(EVENT_NAME, "custom");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment