[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r13655: Fix bug-handling code for unhandled write errors, so that it (in tor/trunk: . src/or)



Author: nickm
Date: 2008-02-21 10:39:26 -0500 (Thu, 21 Feb 2008)
New Revision: 13655

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/main.c
Log:
 r14357@31-33-219:  nickm | 2008-02-21 10:39:11 -0500
 Fix bug-handling code for unhandled write errors, so that it does not try to flush any data on the failed connection. Bugfix on 0.1.2.x.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14357] on 49666b30-7950-49c5-bedf-9dc8f3168102

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-02-21 15:39:24 UTC (rev 13654)
+++ tor/trunk/ChangeLog	2008-02-21 15:39:26 UTC (rev 13655)
@@ -69,6 +69,9 @@
       so it doesn't return failure when any authority disappears.
     - Even though the man page said that "TrackHostExits ." should
       work, nobody had ever implemented it. Bugfix on 0.1.0.x.
+    - Alter the code that tries to recover from unhandled write
+      errors, to not try to flush onto a socket that's given us
+      unhandled errors.  Bugfix on 0.1.2.x.
 
   o Code simplifications and refactoring:
     - Remove the tor_strpartition function: its logic was confused,

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2008-02-21 15:39:24 UTC (rev 13654)
+++ tor/trunk/src/or/main.c	2008-02-21 15:39:26 UTC (rev 13655)
@@ -500,10 +500,7 @@
           edge_conn->end_reason = END_STREAM_REASON_INTERNAL;
         conn->edge_has_sent_end = 1;
       }
-      /* XXX020rc do we need a close-immediate here, so we don't try to
-       * flush? -NM
-       * Yes, we do, since it broke in an unexpected way. This should be
-       * safe to do since I don't think this codepath ever gets called. -RD */
+      connection_close_immediate(conn); /* So we don't try to flush. */
       connection_mark_for_close(conn);
     }
   }