Trustin Lee
7aefd0cbdb
Make AbstractBootstrap public
...
.. to work around the issue with JDK reflection described here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4283544
Fixes #1780
2013-08-24 17:20:53 +09:00
Trustin Lee
8142aae765
Improve the randomness of ThreadLocalRandom for all platform
...
- Fixes #1765
Java 6 did a poor job of generating seedUniquifier unlike 7, so I implemented platform-independent seedUniquifier generator with configurability
2013-08-24 12:25:50 +09:00
Norman Maurer
9ca20b73d3
Add testcase to show channelRegistered is called
2013-08-23 17:17:28 +02:00
bgallagher
51fa795819
fix race condition in test
2013-08-23 16:20:02 +02:00
Norman Maurer
206dc2a391
[ #1772 ] Make sure ChannelOutboundBuffer.recycle() does also reset unflushed, flushed and tail.
...
This fix a IndexOutOfBoundsException which as triggered if recycle() did cut down the buffer[] to the initial size.
2013-08-23 09:01:16 +02:00
Norman Maurer
9fd35d09a2
[ #1770 ] Fix NPE which was thrown if connection timeout was disabled and the connect did not finish directly when using NIO
2013-08-22 12:38:56 +02:00
bgallagher
6a2f340ec0
trim buffers before recycling
2013-08-21 20:28:54 +02:00
bgallagher
fb619f2394
fix writability callback
2013-08-21 16:39:50 +02:00
Norman Maurer
217b8e255c
[ #1763 ] Fill ChannelOutboundBuffer.nioBuffers with null on close to allow the content to be GC'ed
2013-08-20 21:15:05 +02:00
Trustin Lee
15cfa47ad9
Fix checkstyle
2013-08-20 14:40:28 +09:00
Trustin Lee
caf91b9c06
Fix IllegalStateException triggered while shutting down ThreadPerChannelEventLoopGroup
...
- Fix #1718
- Add the test case contributed by @mkw
2013-08-20 14:37:57 +09:00
Trustin Lee
20894bc99e
Fix a bug in internalNioBuffer() implementations of derived buffers
...
- A user can create multiple duplicates of a buffer and access their internal NIO buffers. (e.g. write multiple duplicates to multiple channels assigned to different event loop.) Because the derived buffers' internalNioBuffer() simply delegates the call to the original buffer, all derived buffers and the original buffer's internalNioBuffer() will return the same buffer, which will lead to a race condition.
- Fixes #1739
2013-08-20 14:28:50 +09:00
bgallagher
a383988cdb
add struct to replace parallel arrays consolidate flushed & unflushed buffers
2013-08-18 19:19:57 +02:00
bgallagher
06e250e493
remove unused initialCapacity
2013-08-17 14:10:33 +02:00
Norman Maurer
9e7529b2f5
[ #1743 ] Fix IllegalStateException by remove usage of PendingWrite in ChunkedWriteHandler. This needs more thoughts before re-introduce it
2013-08-16 08:11:19 +02:00
Jeff Pinner
d1f592575a
SPDY: ensure channel close happens after outbound message is written
2013-08-15 20:31:35 +02:00
Norman Maurer
39cabcd36c
[ #1481 ] Add a JdkZlibDecoder which has no dependencies
2013-08-14 07:41:28 +02:00
radimch
9acf130adb
resource leak: FileInputStream was never closed
2013-08-14 07:10:10 +02:00
bk1te
65fd9c0b12
use Promise instead of CallbackNotifier
2013-08-14 06:51:03 +02:00
Norman Maurer
48eb73f9b1
[ #1733 ] Correctly pass the promise to the ctx.write(...) in AbstractTrafficShapingHandler
2013-08-13 08:21:26 +02:00
Norman Maurer
f8f19d1539
[ #1732 ] Fix bug which lead ChannelTrafficShapingHandler stop to work after first Channel was disconnected
2013-08-13 08:09:59 +02:00
Norman Maurer
cc12e40065
[ #1730 ] Correctly release resources in MixedFileUpload after switching from Memory to Disk
2013-08-12 07:23:00 +02:00
Norman Maurer
b9e279064d
Minimize buffer allocation as it is expensive if no pooled buffers are used
2013-08-11 21:55:24 +02:00
Norman Maurer
7d31943326
Remove some dead code
2013-08-11 21:37:43 +02:00
Norman Maurer
73755d1233
[ #1729 ] Let StringEncoder extend MessageToMessageEncoder and so safe a memory copy
2013-08-11 21:24:02 +02:00
Norman Maurer
9a88c50ffb
[ #1728 ] Recycle list after done with it in ReplayingDecoder/ByteToMessageDecoder channelInactive(..)
2013-08-11 21:04:55 +02:00
bgallagher
9f88552f12
remove some dead code
2013-08-10 20:46:48 +02:00
Norman Maurer
280afda013
[ #1715 ] Remove extra call socket.configureBlocking(false)
2013-08-10 20:33:19 +02:00
Norman Maurer
8af5ea8d4f
[ #1658 ] Allow to use AbstractTrafficShapingHandler also with ByteBufHolder based messages
2013-08-10 20:25:35 +02:00
bgallagher
59c2fd8813
[ #1723 ] invoke close in eventloop
2013-08-10 08:19:16 +02:00
Norman Maurer
c1d787bff7
[ #1722 ] ChunkedWriteHandler.doFlush(...) should not call fireExceptionCaught(..)
2013-08-09 21:32:17 +02:00
Norman Maurer
72395bf400
[ #1719 ] Make sure PendingWrite is only recycled once in ChunkedWriteHandler
2013-08-09 18:44:58 +02:00
radimch
0d6a6bde04
resource leak: Formatter was never closed
2013-08-09 14:55:54 +02:00
Norman Maurer
9d8c4ded50
Move method in correct scope
2013-08-09 13:30:04 +02:00
Norman Maurer
4d0621855a
Remove unused package private method and so remove some complexity
2013-08-09 11:44:41 +02:00
Norman Maurer
26ddf0849f
[ #1714 ] Make sure ByteArrayDecoder also works correctly with pooled buffers
2013-08-09 08:40:43 +02:00
Norman Maurer
1547876e97
Tiny optimizations
2013-08-09 08:24:24 +02:00
Norman Maurer
e954eb1c20
Disallow usage of maven 3.1.x (and higher) because of non compability with plugins
2013-08-08 20:43:26 +02:00
Norman Maurer
b54937ab50
[ #1711 ] Allow to use ChannelOption for set / get MessageSizeEstimator
2013-08-08 20:37:35 +02:00
Norman Maurer
f40a3f34b1
[ #1692 ] Allow to set WRITE_BUFFER_HIGH_WATER_MARK and WRITE_BUFFER_LOW_WATER_MARK via ChannelOption
2013-08-08 20:30:01 +02:00
Norman Maurer
1d3560e389
[maven-release-plugin] prepare for next development iteration
2013-08-08 13:53:28 +02:00
Norman Maurer
8e97e6c461
[maven-release-plugin] prepare release netty-4.0.7.Final
2013-08-08 13:53:19 +02:00
Norman Maurer
fc6213604d
Make sure ChannelOutboundBuffer not throw NPE during increment/decrement pending writes
2013-08-08 13:42:25 +02:00
Norman Maurer
b456adf404
[ #1709 ] Correctly detect that Unsafe.copyMemory is missing
2013-08-08 11:57:05 +02:00
Norman Maurer
194b64cff1
[ #1708 ] Correctly set the writerIndex in ReadOnlyByteBufferBuf if it is constructed with a buffer which has non zero position
2013-08-08 06:54:32 +02:00
Norman Maurer
b934b6009c
Share some code, related to [ #1707 ]]
2013-08-07 20:28:33 +02:00
Norman Maurer
5ef30b6d8b
[ #1707 ] More efficient implementation of ChannelHandlerContext.writeAndFlush(..)
2013-08-07 20:15:10 +02:00
Norman Maurer
5b6e762bf4
Allow to have the Channel GC'ed ASAP
2013-08-07 10:32:03 +02:00
Norman Maurer
48a7a21541
Correctly update Channel.isWritable() when the write happens from outside the EventLoop in a fast fashion. Fixes [ #1697 ]
...
Introduce a new interface called MessageSizeEstimator. This can be specific per Channel (via ChannelConfig). The MessageSizeEstimator will be used to estimate for a message that should be written. The default implementation handles ByteBuf, ByteBufHolder and FileRegion. A user is free to plug-in his/her own implementation for different behaviour.
2013-08-07 10:10:43 +02:00
Norman Maurer
60b889375c
Allow to also write FileRegion and ChunkInput when using HTTP chunked. Fixes [ #1693 ]
2013-08-07 09:37:23 +02:00