Permalink
Browse files

Small cleanup

  • Loading branch information...
1 parent 69aaaaa commit 6e047250eb1c1ee01cbe174ea175e3a50b417150 @dgomezferro committed May 2, 2012
Showing with 8 additions and 11 deletions.
  1. +8 −11 src/main/java/com/yahoo/omid/tso/TSOHandler.java
@@ -204,17 +204,14 @@ public void handle(TimestampRequest msg, ChannelHandlerContext ctx) {
synchronized (messageBuffersMap) {
buffer = messageBuffersMap.get(ctx.getChannel());
if (buffer == null) {
-// synchronized (sharedState) {
- synchronized (sharedMsgBufLock) {
- bootstrap = true;
- channel = ctx.getChannel();
- buffer = sharedState.sharedMessageBuffer.new ReadingBuffer(channel);
- messageBuffersMap.put(channel, buffer);
- channelGroup.add(channel);
-// clientChannels.add(channel);
- LOG.warn("Channel connected: " + messageBuffersMap.size());
- }
-// }
+ synchronized (sharedMsgBufLock) {
+ bootstrap = true;
+ channel = ctx.getChannel();
+ buffer = sharedState.sharedMessageBuffer.new ReadingBuffer(channel);
+ messageBuffersMap.put(channel, buffer);
+ channelGroup.add(channel);
+ LOG.warn("Channel connected: " + messageBuffersMap.size());
+ }
}
}
if (bootstrap) {

0 comments on commit 6e04725

Please sign in to comment.