Upgrade to the latest Netty. Resolves issue 321.

This commit is contained in:
Mike Hearn 2013-03-01 16:44:27 +01:00
parent 018dcd345c
commit 1c8ee2b116
4 changed files with 6 additions and 4 deletions

View File

@ -168,7 +168,7 @@
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty</artifactId> <artifactId>netty</artifactId>
<version>3.3.1.Final</version> <version>3.6.3.Final</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -1,14 +1,14 @@
package com.google.bitcoin.core; package com.google.bitcoin.core;
import org.jboss.netty.channel.*; import org.jboss.netty.channel.*;
import org.jboss.netty.util.internal.QueueFactory;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
public class FakeChannel extends AbstractChannel { public class FakeChannel extends AbstractChannel {
final BlockingQueue<ChannelEvent> events = QueueFactory.createQueue(ChannelEvent.class); final BlockingQueue<ChannelEvent> events = new ArrayBlockingQueue<ChannelEvent>(1000);
private final ChannelConfig config; private final ChannelConfig config;
private SocketAddress localAddress; private SocketAddress localAddress;

View File

@ -44,6 +44,7 @@ public class TestWithPeerGroup extends TestWithNetworkConnections {
ChannelSink sink = new FakeChannelSink(); ChannelSink sink = new FakeChannelSink();
return new FakeChannel(this, pipeline, sink); return new FakeChannel(this, pipeline, sink);
} }
public void shutdown() {}
}); });
bootstrap.setPipelineFactory(new ChannelPipelineFactory() { bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() throws Exception { public ChannelPipeline getPipeline() throws Exception {

View File

@ -174,7 +174,7 @@
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty</artifactId> <artifactId>netty</artifactId>
<version>3.3.1.Final</version> <version>${netty.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -203,6 +203,7 @@
<slf4j.version>1.6.2</slf4j.version> <slf4j.version>1.6.2</slf4j.version>
<derby.version>10.8.2.2</derby.version> <derby.version>10.8.2.2</derby.version>
<protobuf.version>2.4.1</protobuf.version> <protobuf.version>2.4.1</protobuf.version>
<netty.version>3.6.3.Final</netty.version>
<generated.sourceDirectory>gen</generated.sourceDirectory> <generated.sourceDirectory>gen</generated.sourceDirectory>
</properties> </properties>