jdk/src/share/classes/sun/net/www/http/KeepAliveStream.java
author martin
Mon, 17 Dec 2012 18:39:59 -0800
changeset 14903 7181b5ef130e
parent 14342 8435a30053c1
child 14915 adbe1c55d078
permissions -rw-r--r--
8004863: Infinite Loop in KeepAliveStream Reviewed-by: chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 14330
diff changeset
     2
 * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3865
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3865
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3865
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3865
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3865
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.net.www.http;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import sun.net.ProgressSource;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import sun.net.www.MeteredStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * A stream that has the property of being able to be kept alive for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * multiple downloads from the same server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @author Stephen R. Pietrowicz (NCSA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * @author Dave Brown
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
class KeepAliveStream extends MeteredStream implements Hurryable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    // instance variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    HttpClient hc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    boolean hurried;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    // has this KeepAliveStream been put on the queue for asynchronous cleanup.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    protected boolean queuedForCleanup = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
    50
    private static final KeepAliveStreamCleaner queue = new KeepAliveStreamCleaner();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
    51
    private static Thread cleanerThread; // null
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * Constructor
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    public KeepAliveStream(InputStream is, ProgressSource pi, long expected, HttpClient hc)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        super(is, pi, expected);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        this.hc = hc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * Attempt to cache this connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    public void close() throws IOException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        // If the inputstream is closed already, just return.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        if (closed) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        // If this stream has already been queued for cleanup.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        if (queuedForCleanup) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        // Skip past the data that's left in the Inputstream because
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        // some sort of error may have occurred.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        // Do this ONLY if the skip won't block. The stream may have
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        // been closed at the beginning of a big file and we don't want
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        // to hang around for nothing. So if we can't skip without blocking
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        // we just close the socket and, therefore, terminate the keepAlive
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        // NOTE: Don't close super class
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            if (expected > count) {
10596
39b3a979e600 7090158: Networking Libraries don't build with javac -Werror
chegar
parents: 9035
diff changeset
    84
                long nskip = expected - count;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                if (nskip <= available()) {
14903
7181b5ef130e 8004863: Infinite Loop in KeepAliveStream
martin
parents: 14342
diff changeset
    86
                    do {} while ((nskip = (long) (expected - count)) > 0L
7181b5ef130e 8004863: Infinite Loop in KeepAliveStream
martin
parents: 14342
diff changeset
    87
                                 && skip(Math.min(nskip, available())) > 0L);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                } else if (expected <= KeepAliveStreamCleaner.MAX_DATA_REMAINING && !hurried) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                    //put this KeepAliveStream on the queue so that the data remaining
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                    //on the socket can be cleanup asyncronously.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                    queueForCleanup(new KeepAliveCleanerEntry(this, hc));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                    hc.closeServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            if (!closed && !hurried && !queuedForCleanup) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                hc.finished();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            if (pi != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                pi.finishTracking();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            if (!queuedForCleanup) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                // nulling out the underlying inputstream as well as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                // httpClient to let gc collect the memories faster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                in = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                hc = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                closed = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    /* we explicitly do not support mark/reset */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    public boolean markSupported()  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    public void mark(int limit) {}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    public void reset() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        throw new IOException("mark/reset not supported");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    public synchronized boolean hurry() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            /* CASE 0: we're actually already done */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            if (closed || count >= expected) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            } else if (in.available() < (expected - count)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                /* CASE I: can't meet the demand */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                /* CASE II: fill our internal buffer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                 * Remind: possibly check memory here
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                int size = (int) (expected - count);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                byte[] buf = new byte[size];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                DataInputStream dis = new DataInputStream(in);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                dis.readFully(buf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                in = new ByteArrayInputStream(buf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                hurried = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        } catch (IOException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            // e.printStackTrace();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   151
    private static void queueForCleanup(KeepAliveCleanerEntry kace) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   152
        synchronized(queue) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   153
            if(!kace.getQueuedForCleanup()) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   154
                if (!queue.offer(kace)) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   155
                    kace.getHttpClient().closeServer();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   156
                    return;
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   157
                }
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   158
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   159
                kace.setQueuedForCleanup();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   160
                queue.notifyAll();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   161
            }
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   162
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   163
            boolean startCleanupThread = (cleanerThread == null);
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   164
            if (!startCleanupThread) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   165
                if (!cleanerThread.isAlive()) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   166
                    startCleanupThread = true;
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   167
                }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   170
            if (startCleanupThread) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   171
                java.security.AccessController.doPrivileged(
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   172
                    new java.security.PrivilegedAction<Void>() {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   173
                    public Void run() {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   174
                        // We want to create the Keep-Alive-SocketCleaner in the
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   175
                        // system threadgroup
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   176
                        ThreadGroup grp = Thread.currentThread().getThreadGroup();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   177
                        ThreadGroup parent = null;
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   178
                        while ((parent = grp.getParent()) != null) {
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   179
                            grp = parent;
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   180
                        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   182
                        cleanerThread = new Thread(grp, queue, "Keep-Alive-SocketCleaner");
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   183
                        cleanerThread.setDaemon(true);
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   184
                        cleanerThread.setPriority(Thread.MAX_PRIORITY - 2);
8167
7599e778785f 7008595: Class loader leak caused by keepAliveTimer thread in KeepAliveCache
chegar
parents: 5506
diff changeset
   185
                        // Set the context class loader to null in order to avoid
7599e778785f 7008595: Class loader leak caused by keepAliveTimer thread in KeepAliveCache
chegar
parents: 5506
diff changeset
   186
                        // keeping a strong reference to an application classloader.
7599e778785f 7008595: Class loader leak caused by keepAliveTimer thread in KeepAliveCache
chegar
parents: 5506
diff changeset
   187
                        cleanerThread.setContextClassLoader(null);
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   188
                        cleanerThread.start();
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   189
                        return null;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                    }
3865
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   191
                });
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   192
            }
cc2ca3d07bbb 6882654: Remove dependency on java.util.concurrent from KeepAlive implementaion
chegar
parents: 715
diff changeset
   193
        } // queue
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    protected long remainingToRead() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        return expected - count;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    protected void setClosed() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        in = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        hc = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        closed = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
}