[ 
https://issues.apache.org/jira/browse/DIRMINA-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530741
 ] 

Trustin Lee commented on DIRMINA-443:
-------------------------------------

"Well...the close() is shutting everything down, so we really don't want more 
connections ;-) Isn't setting a timeout to 0 also a breakout of the loop in a 
similar fashion as the closeFlag? ;-) "

Not exactly.  The breakout caused by timeout makes sure if the number of 
in-progress connection attempt is 0, so there's no FD leak.  However, just 
breaking out of the loop not checking the number can cause a FD leak or related 
ConnectFuture will not be notified at all.  And the worker will be executed 
again when there's any additional connection request.

Once again, we will get rid of the timeout property and maintain a pool of I/O 
workers (including NioProcessor and workers in SocketAcceptor and 
SocketConnector), so please consider the timeout property as a temporary 
workaround for a performance issue.  Therefore, even if we decide to retain the 
close() method, it will go away when the first milestone of MINA 2 is released.

Anyways, please feel free to provide us a new patch that modifies the behavior 
of the close() method.

> SocketConnection cannot be manually closed (for v2.X)
> -----------------------------------------------------
>
>                 Key: DIRMINA-443
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-443
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M1
>            Reporter: Jeff Genender
>            Assignee: Maarten Bosteels
>             Fix For: 2.0.0-M1
>
>         Attachments: DIRMINA-443-jgenender.patch
>
>
> The SocketConnection cannot be closed. Currently it will wait a certain 
> amount of timeout as specified by the worker timeout to shut down the 
> connection. This can result in OOM and hanging clients until the timeouts 
> occur. Mina should allow the SocketConnection to be closed manually if the 
> connection is known to be completed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to