Skip to content
This repository
Browse code

Merge pull request #642 from digitalstain/netty-buffer-timeout

Changes DechunkingChannelBuffer to use milliseconds since that's the configuration provided value
  • Loading branch information...
commit 13f53025ffbc24d65aaebc6e6e1c9e58d5f2c89a 2 parents 9a61087 + 866b7fa
Jacob Hansson jakewins authored
8 enterprise/com/src/main/java/org/neo4j/com/DechunkingChannelBuffer.java
@@ -44,16 +44,16 @@
44 44 private ChannelBuffer buffer;
45 45 private boolean more;
46 46 private boolean hasMarkedReaderIndex;
47   - private final long timeoutSeconds;
  47 + private final long timeoutMillis;
48 48 private boolean failure;
49 49 private final byte applicationProtocolVersion;
50 50 private final byte internalProtocolVersion;
51 51
52   - DechunkingChannelBuffer( BlockingReadHandler<ChannelBuffer> reader, long timeoutSeconds, byte internalProtocolVersion,
  52 + DechunkingChannelBuffer( BlockingReadHandler<ChannelBuffer> reader, long timeoutMillis, byte internalProtocolVersion,
53 53 byte applicationProtocolVersion )
54 54 {
55 55 this.reader = reader;
56   - this.timeoutSeconds = timeoutSeconds;
  56 + this.timeoutMillis = timeoutMillis;
57 57 this.internalProtocolVersion = internalProtocolVersion;
58 58 this.applicationProtocolVersion = applicationProtocolVersion;
59 59 readNextChunk();
@@ -63,7 +63,7 @@ protected ChannelBuffer readNext()
63 63 {
64 64 try
65 65 {
66   - ChannelBuffer result = reader.read( timeoutSeconds, TimeUnit.SECONDS );
  66 + ChannelBuffer result = reader.read( timeoutMillis, TimeUnit.MILLISECONDS );
67 67 if ( result == null )
68 68 {
69 69 throw new ComException( "Channel has been closed" );

0 comments on commit 13f5302

Please sign in to comment.
Something went wrong with that request. Please try again.