*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 13 Jul 2005 22:39:09 +0000 (22:39 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 13 Jul 2005 22:39:09 +0000 (22:39 +0000)
tests/js-test/js/httpd/httpd.js

index b8dc977..5676202 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: httpd.js,v 1.56 2005/07/13 22:05:25 mmondor Exp $ */
+/* $Id: httpd.js,v 1.57 2005/07/13 22:39:09 mmondor Exp $ */
 
 /*
  * Copyright (c) 2005, Matthew Mondor
@@ -56,7 +56,7 @@
  * Server identification
  */
 SERVER_VERSION                 = 'mmondor_js_httpd/0.0.1 (NetBSD)';
-SERVER_CVSID   = '$Id: httpd.js,v 1.56 2005/07/13 22:05:25 mmondor Exp $';
+SERVER_CVSID   = '$Id: httpd.js,v 1.57 2005/07/13 22:39:09 mmondor Exp $';
 
 
 
@@ -494,8 +494,10 @@ function process_transfer(time)
                        } catch (x) {
                                if (this.error != FD.EAGAIN) {
                                        close = true;
-                                       this.transfer_dst.fdatasync();
-                                       this.transfer_dst.close();
+                                       try {
+                                               this.transfer_dst.fdatasync();
+                                               this.transfer_dst.close();
+                                       } catch (x) {}
                                }
                        }
                } else {
@@ -516,7 +518,9 @@ function process_transfer(time)
                                this.transfer_state = STATE_TRANSFER_WRITE;
                        } catch (x) {
                                close = true;
-                               this.transfer_src.close();
+                               try {
+                                       this.transfer_src.close();
+                               } catch (x) {}
                        }
                }
        }
@@ -536,8 +540,11 @@ function process_transfer(time)
                                                close = true;
                                }
                        }
-                       if (close)
-                               this.transfer_src.close();
+                       if (close) {
+                               try {
+                                       this.transfer_src.close();
+                               } catch (x) {}
+                       }
                } else {
                        /* Writing to file */
                        if (this.transfer_eof)
@@ -553,8 +560,10 @@ function process_transfer(time)
                                }
                        }
                        if (close) {
-                               this.transfer_dst.fdatasync();
-                               this.transfer_dst.close();
+                               try {
+                                       this.transfer_dst.fdatasync();
+                                       this.transfer_dst.close();
+                               } catch (x) {}
                        }
                }
        }
@@ -1577,7 +1586,9 @@ function main() {
                        }
 
                        if (close) {
-                               e[i].close();
+                               try {
+                                       e[i].close();
+                               } catch (x) {}
                                counters_dec(e[i]);
                                delete set[e[i].index];
                                delete e[i];