log.trace("Session id: {}", sessionId);
@SuppressWarnings("unchecked")
IConnectionManager<RTMPConnection> connManager = (IConnectionManager<RTMPConnection>) ((WeakReference<?>) session.getAttribute(RTMPConnection.RTMP_CONN_MANAGER)).get();
RTMPConnection conn = (RTMPConnection) connManager.getConnectionBySessionId(sessionId);
if (conn != null) {
<BUG>RTMPConnection prev = null;
if (!conn.equals((RTMPConnection) Red5.getConnectionLocal())) {
log.debug("Connection local ({}) didn't match io session ({})", (Red5.getConnectionLocal() != null ? Red5.getConnectionLocal().getSessionId() : "null"), sessionId);
prev = (RTMPConnection) Red5.getConnectionLocal();

Red5.setConnectionLocal(conn);</BUG>
}

log.trace("Session id: {}", sessionId);
@SuppressWarnings("unchecked")
IConnectionManager<RTMPConnection> connManager = (IConnectionManager<RTMPConnection>) ((WeakReference<?>) session.getAttribute(RTMPConnection.RTMP_CONN_MANAGER)).get();
RTMPConnection conn = (RTMPConnection) connManager.getConnectionBySessionId(sessionId);
if (conn != null) {
RTMPConnection localConn = (RTMPConnection) Red5.getConnectionLocal();
if (!conn.equals(localConn)) {
if (localConn != null) {
log.debug("Connection local ({}) didn't match io session ({})", localConn.getSessionId(), sessionId);
}
Red5.setConnectionLocal(conn);
}
