This should be volatile anyhow

This commit is contained in:
Trustin Lee 2010-02-19 09:08:01 +00:00
parent 0066f9c3ff
commit 28bac1978f

View File

@ -49,7 +49,7 @@ public class LocalTimeClientHandler extends SimpleChannelUpstreamHandler {
LocalTimeClientHandler.class.getName());
// Stateful properties
private Channel channel;
private volatile Channel channel;
private final BlockingQueue<LocalTimes> answer = new LinkedBlockingQueue<LocalTimes>();
public List<String> getLocalTimes(Collection<String> cities) {
@ -106,10 +106,10 @@ public class LocalTimeClientHandler extends SimpleChannelUpstreamHandler {
}
@Override
public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e)
throws Exception {
channel = e.getChannel();
super.channelConnected(ctx, e);
super.channelOpen(ctx, e);
}
@Override