Hi,
Would you mind logging an issue [1] for this? We'll address it asap.
Thanks,
-rl
[1]
http://java.net/jira/browse/GRIZZLY
On 3/30/11 2:04 AM, gagansnt wrote:
> I am using Grizzly NIOInputStream and response suspend/resume facility to
> read from clients.
> Problem I am facing, When a client stops sending file due some error or
> network problem then I do not get any exception or error message on server
> side. I am using exactly the same code as mentioned in one of the samples on
> Grizzly website - Do I need to make any further changes in code in order to
> know that client has stopped sending data.
>
> in.notifyAvailable(new ReadHandler() {
> @Override
> public void onDataAvailable(){
> try {
> doWrite(this, in, buf, out, parser);
> } catch (IOException e) {
> logger.fatal(e.toString());
> }catch (Exception e) {
> logger.fatal(e.toString());
> }
> }
> @Override
> public void onError(Throwable t) {
> logger.info(inputFile+" [onError]" + t.toString());
> System.out.println(inputFile + " [onError]" + t.toString());
> }
> @Override
> public void onAllDataRead() {
> System.out.println("[onAllDataRead] length: " + in.readyData());
> logger.info("[onAllDataRead] length: " + in.readyData());
> try {
> doWrite(this, in, buf, out, parser);
> } catch (IOException e) {
> logger.fatal(e.toString());
> }
> response.resume();
> }
> });
>
>
> Thanks in advance
> Gagan
>
> --
> View this message in context: http://grizzly.1045725.n5.nabble.com/ReadHandler-not-returning-error-on-client-disconnect-tp4271055p4271055.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.