Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 12 19:54:58 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.3 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 m9D2svsf027594 for ; Sun, 12 Oct 2008 19:54:57 -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 m9D32Jxp022053 for ; Sun, 12 Oct 2008 20:02:19 -0700 Message-Id: <200810130302.m9D32Jxp022053@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Final Part 1 Date: Sun, 12 Oct 2008 20:02:19 -0700 From: Bill Cheng Someone wrote: > I had a similar problem as mentioned in this mail regarding the broken pipe. > > After receiving a connection, termination your sleeping child thread which > is trying to connect to the server you just received a connection from might > solve the issue. But it is *possible* (although unlikely) that right before you want to kill this thread, the thread wakes up and tries to connect to this beacon node! So, if this will get a SIGPIPE, it's best to understand why this is happening and fix the bug! -- Bill Cheng // bill.cheng@usc.edu On Sun, Oct 12, 2008 at 7:38 PM, Bill Cheng wrote: > Someone wrote: > > > I am getting a "broken pipe" error when connecting beacons with each > > other on parallel connections. > > For example, I have two beacons, the first one gets a connection request > > from the second one. The messages are exchanged. Now, the first one > > comes out of the retry mode and tries to connect to the second one. > > Connection is established successfully but when it tries to send to the > > second, I get the broken pipe error. What could be a possible reason for > > the same. I am trying this case to test in case of simultaneous > > connections. > > My code however runs fine when upon accepting a connection, I do not try > > to connect to the same port again. > > I don't know why this is happening. My guess is that > it's just a silly bug that's causing the problem! > -- > Bill Cheng // bill.cheng@usc.edu