Commit Graph

2972 Commits

Author SHA1 Message Date
Trustin Lee
2bc252f22b Deprecate specifying an alternative Executor for delegated tasks for SslHandler / Fix a problem where SslHandler consumes too much CPU until the delegated task is finished. 2014-01-09 17:58:51 +09:00
Trustin Lee
013b57f1c1 Fix Java 5 source compatibility issue / Inspector warnings 2014-01-09 15:16:30 +09:00
Trustin Lee
8198f23dbb Fix a regression in SslHandler where delegated tasks run in a different executor makes the session hang
- Fixes #2098
2014-01-09 15:13:31 +09:00
Trustin Lee
f438eb348a Use LinkedHashSet for HttpHeaders.names() and add Javadoc about the performance of names() and entries() 2013-12-22 19:21:07 +09:00
Trustin Lee
7347bfec50 Optimize SslHandler.unwrap() so that it doesn't produce unnecessarily many buffers
- Adapted from 4c7fa950cc
- Related issue: #1905
2013-12-16 21:01:24 +09:00
Frederic Bregier
92bcbcd0e1 Add support for 'charset' property for multipart boundaries
- Fixes #2004
2013-12-16 14:32:34 +09:00
Koen Serry
07f41e8db3 [#1996] Remove bogus jboss-beans.xml 2013-12-14 14:13:15 +01:00
Jeff Pinner
d4bdcefe17 SPDY: add SETTINGS_MINOR_VERSION 2013-12-13 12:09:45 -08:00
Daniel Norberg
f81b65a0ea empty channel buffer: fix tests
* Add @RunWith annotation to ensure that
  @Theory methods run.

* Assert critical invariants after every test and
  after every out of bounds exception.
2013-12-10 06:58:05 +01:00
Daniel Norberg
8b4152dbe0 channel buffer: bytesBefore bounds checking 2013-12-10 06:58:05 +01:00
Daniel Norberg
d210702b4e channel buffer: fix writerIndex increment bug
Ensure that writeByte(int) does not increment
writerIndex if the write was out of bounds.
2013-12-10 06:58:05 +01:00
Daniel Norberg
fb9aa5fa5c Specialized EMPTY_BUFFER class
EmptyChannelBuffer never writes its indices,
which avoids contention when the EMPTY_BUFFER
singleton is used concurrently.
2013-12-05 08:11:32 +01:00
Norman Maurer
a30be3e73e [#2013] Fix a race which could happen to have the worker Thread interrupted during close(...) when using OIO 2013-12-03 08:07:50 +01:00
Trustin Lee
cdf24a161c Fix some inspector warnings 2013-11-04 17:50:40 +09:00
Frederic Bregier
eadf5b3d10 Split HttpPostRequestDecoder into HttpPostStandardRequestDecoder and HttpPostMultipartRequestDecoder / Add HttpData.maxSize
- Related issues: #1937 #1938 and #1946
- Add InterfaceHttpPostRequestDecoder and Make HttpPostRequestDecoder
  implement it
- HttpPostRequestDecoder actually delegates itself to
  HttpPostStandardRequestDecoder or HttpPostMultipartRequestDecoder
- Deprecate IncompatibleDataDecoderException because it's not thrown
  anywhere now
2013-11-04 17:50:07 +09:00
Trustin Lee
e215f91d8f Fix a bug where ChannelFutureProgressListener.operationProgressed() isn't something invoked
- Fixes #1950
- Use writtenBytes instead of localWrittenBytes so that operationProgressed() is triggered even when write operation was split into multiple system calls.
2013-11-02 20:37:50 +09:00
Norman Maurer
0e3ac74889 [#1959] Include a test-case 2013-10-31 06:26:12 +01:00
Norman Maurer
fb6d301090 [#1959] Proposed fix to correctly handle timeouts that overflow the ticks in the wheel 2013-10-31 06:13:27 +01:00
Trustin Lee
6d436948a7 Make all mutable fields in WebSocketClientHandshaker volatile
- Fixes #1945
2013-10-24 17:37:39 +09:00
Trustin Lee
3b324e9515 More robust pipeline manipulation while upgrading to WebSocket
- This commit allows a user to write its first web socket frame right after calling WebSocketServerHandshaker.handshake() rather than adding a listener to the future it returns.
- Should fix #1933
2013-10-18 19:35:38 +09:00
Trustin Lee
68e3b52a2a Add missing @Deprecated annotations 2013-10-18 17:47:40 +09:00
Jeff Pinner
2e5cbeabc4 Backport HttpHeaders / SpdyHeaders from Netty 4. 2013-10-18 16:18:50 +09:00
Bill Gallagher
cb02aa3b61 Merge branch '3' into netty3spdybuf
Conflicts:
	src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockZlibDecoder.java
2013-10-17 14:38:54 -04:00
Bill Gallagher
570e136189 avoid holding onto temporary buffers in SpdyFrameCodec
Conflicts:
	src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockRawDecoder.java
	src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockZlibDecoder.java
2013-10-17 14:18:59 -04:00
Jeff Pinner
a84dacdf0a Merge pull request #1927 from jpinner/spdy_cleanup
SPDY: code cleanup
2013-10-17 08:47:58 -07:00
Trustin Lee
597f40e0d9 Better fix for #1817 - do not close immediately on concurrent closeOutboundAndChannel() 2013-10-18 00:03:13 +09:00
Jeff Pinner
eb84e45e64 SPDY: code cleanup 2013-10-17 07:47:58 -07:00
Trustin Lee
d3c3b1dc89 Fix a dead lock which occurs when multiple threads attempt to close the same SSL connection
- Fixes #1817
2013-10-17 23:41:56 +09:00
Trustin Lee
9278b29ea4 Fix a bug where the warning message is logged in wrong occasion. 2013-10-17 21:22:09 +09:00
Trustin Lee
b2d624a3ba Warn if boss/worker threads are not up within 10 seconds
.. because it is very likely to be a user mistake.

- Fixes #1304
2013-10-17 21:12:03 +09:00
Jeff Pinner
75b52ac334 SPDY: remove SPDY/2 support 2013-10-17 20:29:05 +09:00
Trustin Lee
525dad5d01 Fix the problem where HashedWheelTimer puts a timeout into an incorrect place
- the stopIndex of a timeout is calculated based on the start time of the worker thread and the current tick count for greater accuracy
2013-10-07 17:17:12 +09:00
Jeff Pinner
c96f732c9b SPDY: create partial data frames using writeStreamId 2013-09-27 10:12:36 -07:00
Jeff Pinner
bd54b516b7 SPDY: add SPDY/3.1 support
- with Michael Schore <mschore@twitter.com>
2013-09-26 21:48:58 -07:00
Jeff Pinner
dcced96bee SPDY: make MAX_CONCURRENT_STREAMS unidirectional 2013-09-25 15:10:15 -07:00
Yuta Okamoto
5a44162c52 Fixes bugs when the backed array's offset is not zero. 2013-09-21 20:19:50 +02:00
Norman Maurer
ca2ee88d19 [#1833] Replace ; with & only in the QueryString and not the whole URI. Also add test-case 2013-09-14 12:28:31 +02:00
Trustin Lee
a2532de2c7 Fix build error 2013-09-13 14:07:57 -07:00
Trustin Lee
34a21d3c35 Add the hello world HTTP server example to compare the performance against Netty 4 2013-09-13 13:53:43 -07:00
bgallagher
a512c099ca fail future before firing exception event 2013-09-09 12:37:26 -07:00
Trustin Lee
05ffb0bbe5 Ensure that SelectorUtil is initialized when AbstractNioSelector is initialized
- Related issue: #1701
- The dead lock reported in #1701 is basically because SelectorUtil's logger is initialized in a different thread, so I hope this will fix this specific issue.
2013-09-05 17:38:47 +09:00
Mike Schore
1f6a0407b6 SPDY: allow MAX_CONCURRENT_STREAMS to be set to 0 2013-09-05 16:45:36 +09:00
Jeff Pinner
fd5d75de14 SPDY: ensure channel close happens after outbound message is written 2013-08-15 10:45:38 -07:00
bgallagher
eb80b4e104 intermittent: local channel sometimes sends messages after close 2013-08-09 21:11:17 +02:00
Norman Maurer
0cfbb7d54b [#1503]Fix a bug which incorrectly canceled keys for DatagramPackets when the epoll workaround was used 2013-07-22 11:47:02 +02:00
alain
5aeb836d8e Proposal to improve performance of HttpResponseEncoder#encodeInitialLine 2013-07-11 16:29:30 +02:00
alain
240641a393 Improve performance of encodeHeader 2013-07-02 15:50:36 +09:00
Jeff Pinner
af59aa6ccb SPDY: refactor SpdyHttpEncoder 2013-06-30 12:16:55 +09:00
Jeff Pinner
91ee0e5a56 SPDY: SpdyHeaderBlockDecoder should not discard input data 2013-06-29 09:42:21 +09:00
Jeff Pinner
b3ace85773 SPDY: SpdyFrameDecoder should buffer unread data when decoding headers 2013-06-28 21:28:54 +09:00
Trustin Lee
7654d3df02 Add missing license header / cleanup 2013-06-25 11:08:33 +09:00
Jeff Hodges
55360d2bc8 SPDY: handle too large header blocks 2013-06-25 11:08:33 +09:00
Trustin Lee
6aa4d147d8 Adds port to the host header value in WebSocket client handshake.
Due to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 the port should be added if it differs from the default port. To simplify the code we just always add the port.

Backported from 82176bed76
2013-06-25 11:08:33 +09:00
Jeff Pinner
0ec12dcc60 SPDY: replace exception in SpdyHeaderBlockZlibEncoder with EMPTY_BUFFER 2013-06-25 11:08:33 +09:00
Mike Schore
e04df90698 SPDY: better encapsulation of header encoding/decoding 2013-06-25 11:08:26 +09:00
Jeff Pinner
e279803587 SPDY: update object hierarchy 2013-06-18 07:29:48 +09:00
Jeff Pinner
0b4adc0889 SPDY: always enqueue data frames if stream is stalled 2013-06-05 08:52:56 +02:00
Norman Maurer
6e1c5926ee [#1384] Cache HttpHeaderDateFormat in ThreadLocal 2013-05-27 06:57:15 +02:00
Norman Maurer
97332f6436 [#1383] [#1381] Encode / Decode the cookie expire data the same on all jvms 2013-05-22 14:01:38 +02:00
Norman Maurer
ca51aabc41 [#1374] Allow users to all all subprotocols by using * as wildcard 2013-05-17 22:06:22 +02:00
Norman Maurer
fd75994b16 [#1358] Fix Encoding of multipart attribute names and filenames for non ASCII chars 2013-05-14 15:44:25 +02:00
Norman Maurer
1e380851bd [#1299] Make sure a handshake error will not trigger fireExceptionCaught two times 2013-05-12 13:36:38 +02:00
Norman Maurer
56c34214f8 [#1338] Respect default ByteOrder of ChannelBufferFactory when using ProtoBufEncoder 2013-05-12 13:10:49 +02:00
Norman Maurer
23a919cdcd [#1007] HttpObjectAggregator should only throw one TooLongFrameException per full HTTP message 2013-05-09 20:03:02 +02:00
Norman Maurer
985b450182 Correctly handle multipart disposition 2013-05-08 21:59:00 +02:00
Frederic Bregier
1615009f5a [#1313] Fix for Multipart name and value that should not be encoded, except charset if specified 2013-05-08 10:29:28 +02:00
Norman Maurer
60695012ab [#1310] Fix deadlock which can happen if limit of MemoryAwareThreadPoolExecutor was exceed and an exceptionCaught(..) is triggered by a write 2013-05-06 13:54:25 +02:00
Norman Maurer
960067c78a [#1310] Fix deadlock which can happen if limit of MemoryAwareThreadPoolExecutor was exceed and a close is triggered by a write
* Close must be handled from outside the write lock to fix a possible deadlock
  which can happen when MemoryAwareThreadPoolExecutor is used and the limit is exceed
  and a close is triggered while the lock is hold. This is because the close(..)
  may try to submit a task to handle it via the ExecutorHandler which then deadlocks.
2013-05-06 12:45:13 +02:00
Frederic Bregier
3371f4693b Fix for #1313 & #1332
For issue #1313, partial fix: enhance coding/deconding to missing part.
Now filename is correctly undecoded. Name and Value must be encoded to
allow parsing.
For issue #1332, add text/plain to content-type as default type if not
specified.
2013-05-06 07:17:26 +02:00
Jeff Pinner
06756f3cf8 SPDY: SpdyHttpDecoder cleanup and set content length on last message 2013-05-04 19:30:35 +02:00
Jeff Pinner
79648026ff SPDY: refactor SpdyHttpDecoder to allow subclasses to access messageMap 2013-05-03 20:44:57 +02:00
Norman Maurer
a00f9f0b70 [#1322] Correctly handle the removal of Transfer-Encoding: chunked in HttpChunkAggregator 2013-04-30 20:54:07 +02:00
Trustin Lee
b21b8aef2f Add TCP_NODELAY flag to HttpSnoopServer example 2013-04-25 09:30:32 +09:00
Trustin Lee
e9c5f4fa9a Add more safe-to-ignore exception messages for SslHandler
... which covers the 'Software caused connection abort: recv failed' from Windows and UDT channels
2013-04-24 18:07:21 +09:00
Trustin Lee
79301c650c Fix incorrect name validation in AbstractHttpData
- Fixes #1228
2013-04-23 19:26:50 +09:00
Trustin Lee
16113779c5 Fix a bug where LineBasedFrameDecoder does not handle too long lines correctly
- Related: #1287
2013-04-19 12:48:09 +09:00
Dao Ngoc
babc2b23a1 sendUnsupportedWebSocketVersionResponse should return ChannelFuture 2013-04-16 17:37:30 +09:00
Trustin Lee
ba7b7e785e Fix typo in documentation 2013-04-15 20:18:55 +09:00
Trustin Lee
44027aebbc Better exception message when tickDuration is too big
- Related: #1246
- Fix misc inspector warnings
2013-04-10 13:44:05 +09:00
Norman Maurer
c9f4bb41ac [#1246] Correctly convert to nanos 2013-04-08 10:26:48 +02:00
Norman Maurer
71362beff1 [#1246] Fix cpu-spinning regression in HashedWheelTimer
Also remove the usage of System.currentTimeMillis() completely here to make it more consistent and correct
2013-04-08 07:13:52 +02:00
Trustin Lee
8ded23fba5 Fix a bug in AbstractTrafficShapingHandler.getTimeToWait() where it doesn't work OK when system time goes back. 2013-04-05 13:44:51 +09:00
Trustin Lee
a723a1d7df Potential fix for SslHandler dead lock
- Related with: #1181
2013-04-02 12:56:32 +09:00
Norman Maurer
bad316b05f [#1036] Use special ConnectTimeoutException if a connection timeout happens while using NIO. Not use it for OIO as it may would break users app that detect SocketTimeoutException here 2013-03-27 12:28:02 +01:00
Norman Maurer
04334dbefb [#744] Add test which I missed to commit before 2013-03-27 12:04:15 +01:00
Norman Maurer
cb13e78342 [#744] Port fixes from Akka to HashedWheelTimer
port fix from Akka with following commits:
* cb4e3536b0
* 7e590f3071

And also use constants for worker state for time instead of numeric.
2013-03-27 11:51:43 +01:00
Norman Maurer
982c3ee9ee [#1143] Also stop timer when call releaseExternalResources() 2013-03-27 09:33:46 +01:00
Norman Maurer
bce398819a [#1120] Make sure releaseExternal() can not cause a deadlock if the ExecutorService is shared 2013-03-27 09:30:25 +01:00
Henning Schmiedehausen
7013315fd4 Allow ThreadNameDeterminer everywhere.
Find a couple of places where threads are created but no
ThreadNameDeterminer can be passed in to control the name of the
threads created. Keep all existing c'tors for backwards compatibility.
2013-03-19 17:14:27 +09:00
Trustin Lee
bea6f57011 Add some diagnostic messages to track down why IpFilterRuleTest fails intermittently 2013-03-18 17:36:09 +09:00
Trustin Lee
2f811b723e Fix indentation 2013-03-18 13:32:35 +09:00
Trustin Lee
6a94a086f6 Fix inspector warnings 2013-03-18 13:14:29 +09:00
ursa
32a783cf1b Fix bug in memory-based HTTP data content initialization with input stream, add test.
- Fixes #1169
2013-03-18 13:13:29 +09:00
Trustin Lee
a8b6756554 Ignore a non-deterministic test in SslHandlerTest
- Sometimes, random can generate a seemingly legit SSL record.
2013-03-18 11:15:01 +09:00
Trustin Lee
ecb134b0dc Fix sporadic failure in ThreadRenamingRunnableTest
- Make sure the ThreadNameDeterminer is reset to the default after each test to avoid the side effect between tests
2013-03-16 18:12:13 +09:00
Norman Maurer
33c988b129 [#1159] Make sure we not produce an empty buffer on decodeLast(..) 2013-03-14 13:42:08 +01:00
ursa
afdac5611e Fix life-cycle aware handlers processing in the default pipeline, add tests. 2013-03-14 11:19:34 +01:00
Jared Kuolt
ed6b3b5d0e Fix for issue when a worker pool Executor with N threads where N is < than SelectorUtil.DEFAULT_IO_THREADS is passed into NioServerSocketChannelFactory constructor. 2013-03-14 11:15:21 +01:00
Trustin Lee
45f937f62b Use switch-case 2013-03-14 18:12:59 +09:00
Trustin Lee
def55f5358 Fix an infinite loop in SslHandler due to mysterious BUFFER_OVERFLOW state
- Fixes #1134
2013-03-14 18:12:12 +09:00
Trustin Lee
067a0a8a78 Fix checkstyle 2013-03-13 17:07:47 +09:00
hepin1989
f7f6e69bb6 add support for protobuf 2.5.0 2013-03-13 16:43:36 +09:00
Trustin Lee
5d0d309f98 Fix intermittent test failure in UnsupportedMessageTest 2013-03-04 16:18:02 +09:00
Trustin Lee
16a9dc6224 Fix potential resource leak in SslHandler (part 2)
- Fix a non-sense check
2013-03-04 16:01:03 +09:00
Trustin Lee
e15ca4947e Fix potential resource leak in SslHandler
- Fixes: #1116
2013-03-04 14:41:27 +09:00
Norman Maurer
c4f372b111 [#1097] Make sure the HashedWheelTimer is also stopped on shutdown() 2013-02-27 15:41:20 +01:00
Trustin Lee
a5188b9d25 Tell what the remote address was when ConnectException occurs.
- Fixes #1082
2013-02-22 13:29:35 -08:00
Norman Maurer
cf61cc4a0a [#989] Fix possible deeadlock on close in SslHandler 2013-02-13 09:43:39 +01:00
Trustin Lee
984276355c Use InternalLogger in our code / Use jul in examples 2013-02-11 20:37:31 +09:00
Trustin Lee
9071a624b2 Fix inspector warnings 2013-02-11 16:52:43 +09:00
ursa
e3559518bc Add test for HttpPostRequestDecoder: validate '\r' symbols in the end of binary stream are parsed correctly. 2013-02-06 16:23:25 +01:00
ursa
db502cea4c Fix line-end detection for binary streams upload
- Related: #1017 (and #1016)
2013-02-06 11:55:06 +09:00
Norman Maurer
c12f713cca [#1000] Make post encoded data OAuth compatible 2013-02-02 21:12:30 +01:00
Trustin Lee
e1d3839155 Fix a race in SslHandler.flushPendingEncryptedWrites()
- Ensure all pending encrypted writes are flushed by looping again
- Potential fix for #994
2013-01-30 14:26:50 +09:00
Trustin Lee
b38bde2d2b Allocate smaller dynamic buffer to read a line
- Also fixes some inspector warnings from the previous patch
- Related: #992
2013-01-29 15:53:43 +09:00
Shairon Toledo
9650cda163 Fix for filename enconding
- Fixes #992
2013-01-29 15:51:17 +09:00
Michael Morello
923e69251b NioServerBossPool : init() must be called after super(...) otherwise thread name determiner is not used 2013-01-25 11:13:51 +01:00
Norman Maurer
269fd20843 [#937] Add also a ServerBootstrap.bindAsync() method and correct the javadocs 2013-01-16 09:39:12 +01:00
Norman Maurer
bc64c18827 [#937] Add test for ServerBootstrap.bindAsync(..) 2013-01-16 08:27:44 +01:00
Norman Maurer
cb3c74ea2f [#763] Handle PingWebSocketFrames in the client example 2013-01-16 08:09:34 +01:00
Jeff Pinner
3b1ebf7f10 SPDY: fix improper use of SYNC_FLUSH in SpdyHeaderBlockZlibCompressor 2013-01-16 08:05:12 +01:00
Norman Maurer
fe09ad36e2 [#937] Allow to bind in an async fashion via the new method ServerBootstrap.bindAsync(..) 2013-01-15 15:50:38 +01:00
Norman Maurer
fc5606e034 Make compatible with java5 2013-01-15 09:24:21 +01:00
alexey
9fcd31a4f4 backport socks codec to 3 branch 2013-01-15 09:16:08 +01:00
Aaron
ca7702f38c [#915] [#923] Expanded scope of the handshake locks in SSLHandler to avoid possible negotiation after the first SSLEngine wrap 2013-01-14 21:12:23 +01:00
Jeff Pinner
13b3290fd1 SPDY: fix regression in SpdyFrameDecoder.decodeHeaderBlock() 2013-01-14 10:44:12 -08:00
Jeff Pinner
392f4a9049 SPDY: allow empty header values in SPDY/3 2013-01-14 22:46:35 +09:00
Glynn Morrison
16fc1731b9 Chrome requires the :version: header in SPDY_SESSION_PUSHED_SYN_STREAM frames otherwise it issues a HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS and a SPDY_STREAM_ERROR saying "HEADERS incomplete headers, but pending data frames." 2013-01-14 22:34:07 +09:00
Norman Maurer
c5dbf405d1 [#921] Fix NPE which can be thrown on bad-timing when using WebSocketClientHandshaker07 2013-01-10 11:13:26 +01:00
Trustin Lee
560ccc019c Fix various inspection warnings 2013-01-10 15:24:49 +09:00
Norman Maurer
0365b25e5b [#906] Fix VirtualExecutorService.awaitTermination(..) to behave like specified in the javadocs 2013-01-08 13:49:44 +01:00
Norman Maurer
1bdc13451f [#890] ImmediateExecutor should be public 2013-01-04 11:37:30 +01:00
Norman Maurer
d183c1b24a [#769] Do not set 'Content-Encoding' if the target encoding is 'identity' 2013-01-02 16:16:49 +01:00
Norman Maurer
725a54d07a [#865] Fix regression in SslHandler which can cause to miss a wrap() call 2012-12-29 08:37:39 +01:00
Piotr Bartosiewicz
6274abd134 [#845] Enable PUT of files above 2GB 2012-12-24 21:14:51 +01:00
Norman Maurer
badbc88032 List draft-ietf-hybi-thewebsocketprotocol-07 as supported websocket version 2012-12-20 06:49:43 +01:00
Norman Maurer
c59a4738ef [#832] Add javadocs which explains how to workaround the problem 2012-12-19 15:11:21 +01:00
Norman Maurer
795d336bab [#751] Backport WebSocket 07 support 2012-12-19 12:29:20 +01:00
Trustin Lee
f0a5774fed Do not use slice() to read content of an HTTP message
This fixes the bug introduced while fixing #412
2012-12-19 18:38:03 +09:00
Norman Maurer
f13f3d1ed3 [#799] [#835] Allow to set a timeout for the SslHandler.handshake(), after which it will fail 2012-12-19 10:04:03 +01:00
Norman Maurer
dcd0723a9d [#829] Add test that can be used to verify the fix, this failed before. 2012-12-17 13:53:00 +01:00
Norman Maurer
e784a773f7 [#829] Fix a race in SslHandler which could lead to all types of SSLExceptions, including handshake() failures 2012-12-17 13:52:02 +01:00
Trustin Lee
44938973b4 Fix compilation warnings 2012-12-14 18:35:39 +09:00
Norman Maurer
7278664c0b [#807] SslHandler.handshake() need to respect ChannelFuture of wrapNonAppData(...) 2012-12-13 16:49:47 +01:00
Arya Asemanfar
6f6e1693cf fix containsValue to take snapshot of table and use Arrays.fill for clearing out oldTable 2012-12-12 09:36:22 -08:00
Arya Asemanfar
9dd0756d7a clear out the hash table after resizing, and check for table modification in reads 2012-12-08 11:04:10 +01:00
Norman Maurer
7aa2cfad65 [#775] Rework closing logic of Worker/Boss
Added a shutdown() method on ChannelFactory, Boss, Worker, BossPool, WorkerPool and Bootstrap which can be used to just shutdown the instance and so release all internal created resources. This method is also called when releaseExternalResources() which will also release external created resources like Executors.

This commit also fixes the problem that the Worker/Boss Thread will never be released if you use an Executor (no ExecutorService).
2012-12-05 13:47:10 +01:00
Trustin Lee
95684d92eb [#789] Allow a user to trigger the epoll bug workaround
This commit adds rebuildSelector(s) method to Boss, BossPool, Worker, and WorkerPool.  A user can call rebuildSelector(s) method to initiate the workaround for the infamous epoll 100% CPU bug in Linux based on his or her observations rather than potentially incorrect automatic initiation of the workaround.

Previously, setInterestOps() were executed by a caller thread, which made re-registration of SelectionKeys unsafe.  This commit also ensures setInterestOps() is always executed by an I/O thread.  With this change, we don't need NioProviderMetadata anymore.
2012-12-04 18:24:47 +01:00
Trustin Lee
7f1b38262c Remove unnecessary empty lines 2012-12-03 20:51:25 +09:00
Norman Maurer
a52c5befe3 [786] Fix possible corruption of first WebSocketFrame caused by WebSocketServerHandshaker* 2012-12-02 19:59:41 +01:00