mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-2583 - nio+ssl use thread pool for long tasks
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1145577 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
326d959b03
commit
cdf2e79f48
|
@ -19,6 +19,7 @@ package org.apache.activemq.transport.nio;
|
|||
|
||||
import org.apache.activemq.command.Command;
|
||||
import org.apache.activemq.openwire.OpenWireFormat;
|
||||
import org.apache.activemq.thread.DefaultThreadPools;
|
||||
import org.apache.activemq.util.IOExceptionSupport;
|
||||
import org.apache.activemq.util.ServiceStopper;
|
||||
import org.apache.activemq.wireformat.WireFormat;
|
||||
|
@ -204,7 +205,6 @@ public class NIOSSLTransport extends NIOTransport {
|
|||
//TODO deal with BUFFER_OVERFLOW
|
||||
|
||||
if (status == SSLEngineResult.Status.CLOSED) {
|
||||
//TODO do shutdown
|
||||
sslEngine.closeInbound();
|
||||
return -1;
|
||||
}
|
||||
|
@ -223,10 +223,9 @@ public class NIOSSLTransport extends NIOTransport {
|
|||
secureRead(ByteBuffer.allocate(sslSession.getApplicationBufferSize()));
|
||||
break;
|
||||
case NEED_TASK:
|
||||
//TODO use the pool
|
||||
Runnable task;
|
||||
while ((task = sslEngine.getDelegatedTask()) != null) {
|
||||
task.run();
|
||||
DefaultThreadPools.getDefaultTaskRunnerFactory().execute(task);
|
||||
}
|
||||
break;
|
||||
case NEED_WRAP:
|
||||
|
|
Loading…
Reference in New Issue