Hi Lothar,

Thanks for the reply.

Can you suggest me a solution , so that program can get out of loop as soon
as command is executed.

Regards,
Abhimanu Handoo

On Mon, Oct 28, 2019 at 6:04 PM Lothar Kimmeringer <j...@kimmeringer.de>
wrote:

>
>
> Am 28.10.2019 um 05:35 schrieb Abhimanu Handoo:
> >           while(in.available()>0){
>
> available() returns the number of bytes that can be read without blocking.
> I assume that this returns 0 all the time and because you don't do any
> attempt to actually read from the stream (leading to blocking) you never
> end the loop.
>
> BTW:
> >           if(i<0)break;
>
> -1 is only returned if the end of stream is reached. Having this
> inside a block that is only entered after you know that there is
> data to be read (i.e. the end is not reached) makes no real sense.
>
>
> Cheers, Lothar
>
>
> _______________________________________________
> JSch-users mailing list
> JSch-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jsch-users
>


-- 


*Thanks and Regards,Abhimanu Handoo+91-7838562222*
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to