Skip to content

Commit

Permalink
Fixed issue #60
Browse files Browse the repository at this point in the history
git-svn-id: http://red5.googlecode.com/svn/java/server/trunk@4258 1b6495e4-3631-0410-8e05-8f51eee8b9cc
  • Loading branch information
mondain committed Jul 27, 2011
1 parent 3ae4b33 commit 5e079a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/org/red5/server/so/ClientSharedObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ public void dispatchEvent(IEvent e) {
break;

case CLIENT_UPDATE_ATTRIBUTE:
attributes.put(event.getKey(), event.getValue());
notifyUpdate(event.getKey(), event.getValue());
Object val = event.getValue();
// null values are not allowed in concurrent hash maps
if (val != null) {
attributes.put(event.getKey(), val);
}
// we will however send the null out to the subscribers
notifyUpdate(event.getKey(), val);
break;

default:
Expand Down
5 changes: 2 additions & 3 deletions src/org/red5/server/stream/StreamingProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
* @author Steven Gong (steven.gong@gmail.com)
* @author Andy Shaules (bowljoman@hotmail.com)
*/
public class StreamingProxy implements IPushableConsumer, IPipeConnectionListener, INetStreamEventHandler,
IPendingServiceCallback {
public class StreamingProxy implements IPushableConsumer, IPipeConnectionListener, INetStreamEventHandler, IPendingServiceCallback {

private static Logger log = LoggerFactory.getLogger(StreamingProxy.class);

Expand Down Expand Up @@ -114,7 +113,7 @@ public void onPipeConnectionEvent(PipeConnectionEvent event) {
// nothing to do
}

synchronized public void pushMessage(IPipe pipe, IMessage message) throws IOException {
public synchronized void pushMessage(IPipe pipe, IMessage message) throws IOException {
if (state >= PUBLISHED && message instanceof RTMPMessage) {
RTMPMessage rtmpMsg = (RTMPMessage) message;
rtmpClient.publishStreamData(streamId, rtmpMsg);
Expand Down

0 comments on commit 5e079a6

Please sign in to comment.