Fixed a problem where LocalChannel.getParent() always returns null

This commit is contained in:
Trustin Lee 2009-02-09 07:46:45 +00:00
parent a0e57b4428
commit ce7ca53bdf
3 changed files with 4 additions and 4 deletions

View File

@ -55,8 +55,8 @@ public class LocalChannel extends AbstractChannel {
private final LocalChannelConfig config;
final Queue<MessageEvent> writeBuffer = new LinkedTransferQueue<MessageEvent>();
LocalChannel(ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, LocalChannel pairedChannel) {
super(null, factory, pipeline, sink);
LocalChannel(LocalServerChannel parent, ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, LocalChannel pairedChannel) {
super(parent, factory, pipeline, sink);
this.pairedChannel = pairedChannel;
config = new LocalChannelConfig();
fireChannelOpen(this);

View File

@ -39,7 +39,7 @@ public class LocalClientChannelFactory implements ChannelFactory {
}
public Channel newChannel(ChannelPipeline pipeline) {
return new LocalChannel(this, pipeline, sink, null);
return new LocalChannel(null, this, pipeline, sink, null);
}
public void releaseExternalResources() {

View File

@ -129,7 +129,7 @@ final class LocalClientChannelSink extends AbstractChannelSink {
}
future.setSuccess();
LocalChannel acceptedChannel = new LocalChannel(serverChannel.getFactory(), pipeline, this, channel);
LocalChannel acceptedChannel = new LocalChannel(serverChannel, serverChannel.getFactory(), pipeline, this, channel);
channel.pairedChannel = acceptedChannel;
bind(channel, succeededFuture(channel), LocalAddress.newEphemeralInstance());