Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 31 08:20:48 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m9VFKmb2018091 for ; Fri, 31 Oct 2008 08:20:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m9VFWd01028196 for ; Fri, 31 Oct 2008 08:32:39 -0700 Message-Id: <200810311532.m9VFWd01028196@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: timeout Date: Fri, 31 Oct 2008 08:32:39 -0700 From: Bill Cheng Someone wrote: > I have a quick question when I write timer thread. > > Could you tell me which understanding between the following is > correct? Let's take the join timeout for example. > > 1->Before Join timeout, the program just block there to receive > any amount of join_response message. After timeout, the node > select the nearest nodes to add to neighbor list. Then it send > hello message, and do the following thing.(Ctrl-C could interrupt > timeout) > > > 2->If before the join timeout, the node has received > enough(InitNeighbors) join response. Then it goes to the > following steps. In this case, the timeout is used to test when > timeout occurs, there are not enough nodes response the join > request. > > 1 or 2 is correct? (1) is more correct than (2). You should wait for the join timeout to expire. (You should also do a soft restart before you start making connections and saying hellos to your new neighbors.) -- Bill Cheng // bill.cheng@usc.edu