Index: main.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/main.cc,v
retrieving revision 1.28
diff -u -p -r1.28 main.cc
--- main.cc	18 Aug 2003 02:12:49 -0000	1.28
+++ main.cc	30 Aug 2003 21:35:09 -0000
@@ -1093,6 +1093,14 @@ main(int argc, char **argv)
         if (do_reconfigure) {
             mainReconfigure();
             do_reconfigure = 0;
+#if defined(_SQUID_MSWIN_) && defined(_DEBUG)
+
+        } else if (do_debug) {
+            do_debug = 0;
+            __asm int 3;
+            
+#endif
+
         } else if (do_rotate) {
             mainRotate();
             do_rotate = 0;
Index: comm.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm.cc,v
retrieving revision 1.36
diff -u -p -r1.36 comm.cc
--- comm.cc	16 Aug 2003 02:12:31 -0000	1.36
+++ comm.cc	30 Aug 2003 21:35:09 -0000
@@ -1407,6 +1407,13 @@ commResetFD(ConnectStateData * cs)
         return 0;
     }
 
+#ifdef _SQUID_MSWIN_
+    
+    /* On Windows dup2() can't work correctly on Sockets, the          */
+    /* workaround is to close the destination Socket before call them. */
+    close(cs->fd);
+#endif
+
     if (dup2(fd2, cs->fd) < 0) {
         debug(5, 0) ("commResetFD: dup2: %s\n", xstrerror());
 


