mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DIRMINA-814) Slow Receivers(servers) cannot read data already written by client applications after connection close is initiated by client
Date Mon, 03 Jan 2011 00:27:45 GMT

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

Emmanuel Lecharny resolved DIRMINA-814.
---------------------------------------

    Resolution: Won't Fix

This behavior is completly normal : as the stream processing is done in a separate thread,
it's very likely that the close event is processed before the remaining bytes are being processed.


If you transform your server to be :

...
class ClientConnectionHandler extends IoHandlerAdapter {

    public void messageReceived( IoSession session, Object message )
    {
        String str = new String( ((IoBuffer) message).array() );
        System.out.println(str);
    }
}

you'll get the entire text dumped in the console.

> Slow Receivers(servers) cannot read data already written by client applications after
connection close is initiated by client
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-814
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-814
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>         Environment: Windows Vista
>            Reporter: Amol Nayak
>             Fix For: 2.0.3
>
>         Attachments: Mina20Server.java, SimpleMINAServerClient.java, Toronto.txt
>
>
> A simple MINA server is developed which is simulating a slow server, the read is done
after a sleep of 10 ms.
> A clients writes a huge chunk of bytes and closes the connection.
> This close denies a read to the stream from the client and the data already sent to server
is not available for read.
> A more reasonable behavior is to disallow writes but allow the server  to read at least
what is being already published to the server.

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


Mime
View raw message