Trustin Lee
237ba27499
Better exception message
2014-01-13 23:32:49 +09:00
Norman Maurer
13d65d7ccf
[ #2104 ] Make sure we only act on the SelectionKey if it is valid
2014-01-09 18:27:56 +01:00
Trustin Lee
751943ed00
Fix a potential NPE due to the race between a connection attempt and its cancellation
...
- should fix #2086
2014-01-09 19:24:44 +09:00
Norman Maurer
0bbc3facec
[ #2086 ] Fix race which could produce NPE in AbstractNioUnsafe.finishConnect
2014-01-09 08:22:34 +01:00
milenkovicm
393f7b2306
ChannelOutboundBuffer returns total pending write size
...
total pending write size may be used to optimize write batching
2014-01-07 06:52:07 +01:00
Veebs
dd8f4bc0c4
Fix typo
2014-01-03 11:15:14 +01:00
Norman Maurer
fc2e6916d9
Fix regression which was introduced by 89a7cb8e71
...
Related to [#2060 ]
2013-12-21 21:39:51 +01:00
Trustin Lee
bab227213e
Increase the default maxMessagesPerRead of AbstractNioByteChannel to 16
...
- Related: #2079
2013-12-21 20:08:42 +09:00
Trustin Lee
1fcd19a28f
Fix a bug where adaptive recvbuf size prediction doesn't work correctly when maxMessagesPerRead is > 1
2013-12-21 19:57:11 +09:00
Norman Maurer
b889d3f559
[ #2079 ] Stop reading once the NIO byte Channel was complete drained
2013-12-21 10:38:07 +01:00
Trustin Lee
89a7cb8e71
More graceful registration failure
...
- Fixes #2060
- Ensure to return a future/promise implementation that does not fail with 'not registered to an event loop' error for registration operations
- If there is no usable event loop available, GlobalEventExecutor.INSTANCE is used as a fallback.
2013-12-21 18:08:58 +09:00
Trustin Lee
ceaebd37ed
Rename flushAndWrite() to writeAndFlush()
...
- Fixes : #2066
- Fixed inspection warnings
2013-12-16 15:02:13 +09:00
Trustin Lee
82b6e75b96
Rename flushAndWrite() to writeAndFlush()
...
- Related: #2066
2013-12-16 14:58:40 +09:00
Norman Maurer
e136227ee6
[ #2065 ] Fix NPE in AbstractOioByteChannel during write to the socket
2013-12-15 11:41:04 +01:00
Trustin Lee
4116de8360
Fix NoSuchElementException raised by ChannelInitializer
...
.. again.
2013-12-07 11:04:40 +09:00
Trustin Lee
02703e8fc1
Revert "Fix NoSuchElementException raised by ChannelInitializer"
...
This reverts commit 3c453f5dba
.
2013-12-07 11:04:33 +09:00
Trustin Lee
51428004b3
Fix NoSuchElementException raised by ChannelInitializer
2013-12-07 00:39:21 +09:00
Norman Maurer
7ec70d0210
Merge package private interfaces into public ones. Related to [ #1989 ] and [ #1991 ]
2013-11-25 10:37:34 +01:00
Trustin Lee
fd776274c9
Additional fix for potential race condition which occurs when a user cancels a connection attempt
...
- Fixes #1986
2013-11-18 17:00:43 +09:00
Trustin Lee
54d3c99469
Fix an unexpected IllegalStateException from a selector loop when a user cancels a connection attempt
...
- Fixes #1986
2013-11-18 16:33:21 +09:00
Trustin Lee
ec10409314
Saner toString() implementation for EmbeddedSocketAddress
2013-11-08 18:04:40 +09:00
Norman Maurer
7dddbbb2bd
Fix possible leak when a write is rejected
2013-11-07 10:24:15 +01:00
Norman Maurer
77054d7ecb
Fix regression which lead to leak buffers when nothing could be read from the Channel.
...
This was introduced as part of #1812 , but fortunatualy was not part of any release.
2013-11-07 07:12:19 +01:00
Trustin Lee
d2032254b7
Enable AUTO_CLOSE opton by default for backward compatibility / Deprecare AUTO_CLOSE option because it's gone in 5.0.
...
- Related #1952
2013-11-05 17:40:23 +09:00
Trustin Lee
c7b66545b4
Add AUTO_CLOSE option
...
- Fixes #1952
- If AUTO_CLOSE is turned on, Netty will close the channel immediately and automatically on write failure. The default is false.
2013-11-05 17:24:36 +09:00
Trustin Lee
54db9ec725
Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
...
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2013-11-04 19:46:15 +09:00
Norman Maurer
e9967e55ad
[ #1940 ] Add javadoc to explain how the FileChannel is closed when using DefaultFileRegion
2013-11-02 15:59:33 +01:00
Trustin Lee
e1baa3f9b4
Simplify
2013-11-02 20:03:41 +09:00
Trustin Lee
72c78ebe75
Add an important notice about future migration issue in SimpleChannelInboundHandler.
...
- Related: #1590
2013-11-02 20:03:15 +09:00
Norman Maurer
b53fa5dd70
[ #1812 ] All to have NioMessageUnsafe.read() inlined
2013-10-26 17:44:25 +02:00
Trustin Lee
8986245b47
Deprecate UniqueName and its subtypes' constructors / Add valueOf() for easier future migration.
2013-10-25 20:53:47 +09:00
Norman Maurer
544d68b396
[ #1812 ] Allow for inline for most common cases when use NioByteUnsafe.read()
2013-10-25 13:32:21 +02:00
Norman Maurer
e4358ae6b8
[ #1947 ] Handle RejectExecutionException graceful for outbound operations
2013-10-25 07:51:17 +02:00
Norman Maurer
9fd8bf329d
More efficient handling of incomplete writes.
...
The problem with the old way was that we always set the OP_WRITE when the buffer could not be written
until the write-spin-count was reached. This means that in some cases the channel was still be writable
but we just was not able to write out the data quick enough. For this cases we should better break out the
write loop and schedule a write to be picked up later in the EventLoop, when other tasks was executed.
The OP_WRITE will only be set if a write actual returned 0 which means there is no more room for writing data
and this we need to wait for the os to notify us.
2013-10-17 20:23:47 +09:00
Norman Maurer
53fcff2eab
[ #1920 ] Fix IndexOutOfBoundsException when using PooledByteBufAllocator with SCTP and NIO Datagram channels
2013-10-16 09:53:26 +02:00
Norman Maurer
df442b9b6a
#1924 ] Only log RejectExecutorException when call invokeLater(...)
2013-10-15 15:22:46 +02:00
Norman Maurer
068c75a025
[ #1924 ] Correctly fail promise when EventExecutor was shutdown in between deregister
2013-10-15 14:01:59 +02:00
Trustin Lee
c9b7f1f1b5
Ensure the selector implementation can be instrumented before attempting instrumentation
...
- Fixes #1908
2013-10-11 12:08:51 +09:00
Trustin Lee
d7f9b1ee76
Fixes the problem where the promise of the outbound operation that causes a channel closure is notified after channelInactive()
...
- Fixes #1897
2013-10-08 12:24:16 +09:00
Norman Maurer
c0936fc8e7
[ #1890 ] Correctly expand ByteBuffer array in all cases
...
The problem was that we did not handle the case correctly when doubling the array was not enough. We need to keep doubling until everything fits in.
2013-10-06 15:29:35 +02:00
Bill Gallagher
013ac44d3a
[ #1832 ] - Channel writability change notifications sometimes fail to fire
2013-09-30 20:01:39 +02:00
Norman Maurer
b4fa8af079
Cache underlying ByteBuffers and count in ChannelOutboundBuffer.Entry to reduce object creation and so GC pressure
...
Beside this it also helps to reduce CPU usage as nioBufferCount() is quite expensive when used on CompositeByteBuf which are
nested and contains a lot of components
2013-09-26 20:37:39 +02:00
Norman Maurer
ae904a1f56
Introduce a new ChannelOption called DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION. Related to [ #1830 ]
...
This ChannelOption allows to tell the DatagramChannel implementation to be active as soon as they are registrated to their EventLoop. This can be used to make it possible to write to a not bound DatagramChannel.
The ChannelOption is marked as @deprecated as I'm looking for a better solution in master which breaks default behaviour with 4.0 branch.
2013-09-24 11:46:49 +02:00
Sasha Zverev
a2624a833e
Slip in DefaultOioSocketChannelConfig (setAllowHalfClosure used to ignore argument)
2013-09-21 20:13:52 +02:00
Norman Maurer
f034f90fb3
[ #1836 ] Add comment to explain why read is triggered
2013-09-17 06:58:47 +02:00
Norman Maurer
357677d8fa
[ #1830 ] Add testcase for write to not bound DatagramChannel impls and revert change in OIO as it breaks things as the udnerlying socket lazy binds
2013-09-12 09:27:43 +02:00
Norman Maurer
f4f04a08c2
Make DatagramChannel impls .isActive() return true when the underlying Channel is open. This also fixes [ #1830 ]
2013-09-11 20:37:21 +02:00
Norman Maurer
7d9388a3cc
Allow to only register a Channel via AbstractBootstrap and bind/connect it later. Related to [ #1829 ]
2013-09-11 20:14:53 +02:00
Norman Maurer
af499b5fb4
Mark ChannelHandler.exceptionCaught(...) as deprecated in preparation to move to ChannelInboundHandler. Related to [ #1808 ]
2013-09-08 20:11:51 +02:00
Trustin Lee
ad0c456209
Ensure operationProgressed is invoked even on completion
...
- Fixes #1809
2013-09-05 18:37:14 +09:00