commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Zemann <oliver.zem...@gmail.com>
Subject Re: NPE in getRemoteAdress
Date Mon, 29 Aug 2016 17:03:43 GMT
Thanks Bernd, i will fix that.

Martin, i tried the following:

client.setDataTimeout(20000);
client.setControlKeepAliveReplyTimeout(20000);
client.setConnectTimeout(20000);


Did not help, unfortunately.

Regards
Oli

Am 29.08.2016 um 01:40 schrieb Martin Gainty:
> possible timeout waiting for FTP to reply
> examples.ftp.FTPClientExample says to increase FTP reply timeout with -w parameter
>   if (args[base].equals("-w")) {                controlKeepAliveReplyTimeout = Integer.parseInt(args[++base]);
           }
> or with FTPClient:ftpClient.setControlKeepAliveReplyTimeout(2000); //2 sec reply timeout
> ?
> Martin
> ______________________________________________
>
>
>
>> Date: Sun, 28 Aug 2016 20:06:46 +0200
>> From: ecki@zusammenkunft.net
>> To: user@commons.apache.org
>> CC: oliver.zemann@gmail.com
>> Subject: Re: NPE in getRemoteAdress
>>
>> Hello,
>>
>> I am not sure about your NPE, but this code here ignores the result of
>> the read call. It cannot deal with short reads:
>>
>>   Am Sun, 28 Aug 2016
>> 15:50:36 +0200 schrieb Oliver Zemann <oliver.zemann@gmail.com>:
>>> byte b[] =new byte[4096];
>>> while (inputStream.read(b) != -1) {
>>>    fos.write(b);
>>>    bytesWritten += b.length;
>>
>> Gruss
>> Bernd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>   		 	   		


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message