Enabling a client timeout

"이희승 (Trustin Lee)" trustin at gmail.com
Fri Aug 14 16:39:36 EDT 2009


You can grab the snapshot here:

http://trustin.dyndns.org/hudson/job/netty-trunk-deploy/34/

On 08/15/2009 05:27 AM, 이희승 (Trustin Lee) wrote:
> Hi Michael,
> 
> I've just checked in the fix.  Could you please let me know if
> connection timeout works now?
> 
> Trustin
> 
> On 08/06/2009 03:44 PM, 이희승 (Trustin Lee) wrote:
>> On 08/06/2009 03:40 PM, 이희승 (Trustin Lee) wrote:
>>> On 08/06/2009 03:34 PM, Christian Migowski wrote:
>>>> On Thu, Aug 6, 2009 at 1:49 AM, Michael
>>>> Elsdörfer<michael at elsdoerfer.info> wrote:
>>>>> Well, I would expect the OS to expose those options to applications. And
>>>>> in fact, using the normal Java socket API the timeout does work for me:
>>>>>
>>>>> Socket sock = new Socket();
>>>>> sock.connect(new InetSocketAddress("host", 8765), 500);
>>>>>
>>>>> This times out after 500 msecs, while taking 20 secs if no timeout is
>>>>> specified.
>>>>>
>>>>> Are you saying there is now way to achieve this behavior in netty?
>>>>
>>>> no. specifying the connectTimeoutMillis option like the original
>>>> poster did will ultimatively do the same in the Netty internals as
>>>> your code (if you are using the "OIO" transport).
>>>>
>>>> I wonder if it is a bug or intended that this option isn't used in the
>>>> NIO transport - I am not  a Netty developer, you know.
>>>
>>> You are right.  I forgot to implement connect timeout in the NIO
>>> transport.  Should be fixed in the next release.  What a mistake. :-o
>>
>> Here's the corresponding JIRA issue:
>>
>>   * https://jira.jboss.org/jira/browse/NETTY-204
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users



More information about the netty-users mailing list