[Red5] RES: Cannot access to shared object from appDisconnect
Luiz Filipe
lffc.br at terra.com.br
Wed May 9 14:56:36 EDT 2007
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: Red5-bounces at osflash.org [mailto:Red5-bounces at osflash.org]Em nome de
Florencio Cano
Enviada em: terca-feira, 8 de maio de 2007 08:37
Para: Red5 at osflash.org
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
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
More information about the Red5
mailing list