if (bsScope != null && conn instanceof BaseConnection) {
((BaseConnection) conn).unregisterBasicScope(bsScope);
}
}
stream.close();
scConn.deleteStreamById(streamId);
// in case of broadcasting stream, status is sent automatically by Red5
if (!(stream instanceof IClientBroadcastStream)) {
StreamService.sendNetStreamStatus(conn, StatusCodes.NS_PLAY_STOP, "Stream closed by server", stream.getName(), Status.STATUS, streamId);
}
} else {