}
// Provide a valid IConnection in the Red5 object
final IGlobalScope global = getGlobalScope(req);
final IContext context = global.getContext();
final IScope scope = context.resolveScope(global, packet.getScopePath());
IRemotingConnection conn = new RemotingConnection(req, scope, packet);
// Make sure the connection object isn't garbage collected
req.setAttribute(CONNECTION, conn);
try {
Red5.setConnectionLocal(conn);
handleRemotingPacket(req, context, scope, packet);