[ 
https://issues.apache.org/jira/browse/DIRMINA-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Trustin Lee resolved DIRMINA-241.
---------------------------------

    Resolution: Fixed

The fix for this long-standing problem has been checked in.  I used a queue to 
store the events to fire when a SSLFilter holds a lock, and fired them after 
the lock is released, and therefore, the events are forwarded with no hold 
lock, which fixed the deadlock.

Sung jun, could you please test your application again and close this issue if 
my fix solves your problem?

> Calling other session's write() in messageReceived() handler causes deadlock 
> when a SSLFilter is used.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-241
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-241
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2
>            Reporter: jo,sung jun
>         Assigned To: Trustin Lee
>             Fix For: 1.0.3
>
>         Attachments: thread thump.txt
>
>
> Hello,
> Could you advise for me about this problem.
> I attached server thread thumb.
> I run the server , There are many clients,
> When I use session.write , it happened deadlock.
> I don't know why~
> > this is some sample about multicast. 
>       public void multicast(String channelName, Object message) {
>               if (!(message instanceof ByteBuffer)) {
>                       return;
>               }
>               ByteBuffer rb = (ByteBuffer) message;
> //            try{
>                       GameRoom channel = RoomManager.getRoom(channelName);
>                       List list = (List) channel.getUsers();
>                       Iterator it = list.iterator();
>                       while (it.hasNext()) {
>                               ByteBuffer buf = rb.duplicate();
>                               User user = (User) it.next();
>                               WrteFuture future = 
> users.getSession().write(buf);
>                                                                               
>        future.join();
>                               
>                       }
>                       rb.release();
> //            }catch(Throwable t) {
> //                    }
>       }

-- 
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