Florencio,

Red5 destroy the SO when the last client disconnects from it.
In our application, we verify each clients disconnection, and on the last
client we re-create the so?s.
Another options is to call the acquire method that in theory must prevent
this situation.

Regards,

Luiz Filipe.

-----Mensagem original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de
Florencio Cano
Enviada em: terca-feira, 8 de maio de 2007 08:37
Para: [email protected]
Assunto: [Red5] Cannot access to shared object from appDisconnect


I can't access to the shared object. The log.info("Shared object: " +
users_so); prints a users_so==null. And
users_so.hasAttribute(client_id) return null pointer exception. Why?

-----------------

public void appDisconnect(IConnection conn) {
                String client_id = 
conn.getClient().getAttribute("id").toString();
                log.info("Client: " + client_id + " disconnected");
                ISharedObject users_so = getSharedObject(conn.getScope(), 
"users");
                log.info("Created shared object in appDisconnect: " + users_so);
                log.info("This is the scope in appDisconnect: " + 
conn.getScope());
                log.info("Shared object: " + users_so);
                idPool.addElement(client_id);
                if (users_so.hasAttribute(client_id)) {
                        users_so.removeAttribute(client_id);
                }
                log.info("Client disconnected " + conn.getClient().getId() + " 
conn "   +
conn);
        }

----------------

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to