Skip to content

Commit

Permalink
openvidu-server: fix possible ghost participant issue after network r…
Browse files Browse the repository at this point in the history
…econnection
  • Loading branch information
pabloFuente committed Jun 28, 2023
1 parent efcc15a commit cc402f3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,9 @@ public void afterConnectionClosed(Session rpcSession, String status) throws Exce
String rpcSessionId = rpcSession.getSessionId();
String message = "";

if ("Close for not receive ping from client".equals(status)) {
if ("Connection closed for reconnection".equals(status)) {
message = "Evicting ghost reconnection participant with private id {}";
} else if ("Close for not receive ping from client".equals(status)) {
message = "Evicting participant with private id {} because of a network disconnection";
} else if (status == null) { // && this.webSocketBrokenPipeTransportError.remove(rpcSessionId) != null)) {
try {
Expand All @@ -810,7 +812,7 @@ public void afterConnectionClosed(Session rpcSession, String status) throws Exce

if (this.webSocketEOFTransportError.remove(rpcSessionId) != null) {
log.warn(
"Evicting participant with private id {} because a transport error took place and its web socket connection is now closed",
"Evicting participant with private id {} because a transport error took place and its websocket connection is now closed",
rpcSession.getSessionId());
this.leaveRoomAfterConnClosed(rpcSessionId, EndReason.networkDisconnect);
}
Expand Down

0 comments on commit cc402f3

Please sign in to comment.