[Red5] Culling dead client connections

Mondain mondain at gmail.com
Fri Jun 5 16:49:26 PDT 2009


The sample i just pulled up uses this..

@Override
public void appDisconnect(IConnection conn) {
log.info("appDisconnect");
// get the previously stored id
String clientId = conn.getClient().getId();
log.debug("appDisconnect - client id: {}", clientId);
// unregister user
IConnection cn = connectionMap.remove(clientId);
if (log.isDebugEnabled()) {
if (cn != null) {
log.debug("Client id {} ({}} disconnected", clientId, cn);
} else {
log.debug("Client id ({}) disconnected", clientId);
}
}

...... some clean up routines were here .....

super.appDisconnect(conn);
// remove all conn attributes
conn.removeAttributes();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090605/c9938a14/attachment.html>


More information about the Red5 mailing list