提交 298a15fa 编写于 作者: M michaelm

6630639: lightweight HttpServer leaks file descriptors on no-data connections

Summary: not cleaning up no-data connections properly
Reviewed-by: chegar
上级 498d2fd6
......@@ -52,6 +52,9 @@ class Request {
os = rawout;
do {
startLine = readLine();
if (startLine == null) {
return;
}
/* skip blank lines */
} while (startLine.equals (""));
}
......
......@@ -441,6 +441,7 @@ class ServerImpl implements TimeSource {
rawin = sslStreams.getInputStream();
rawout = sslStreams.getOutputStream();
engine = sslStreams.getSSLEngine();
connection.sslStreams = sslStreams;
} else {
rawin = new BufferedInputStream(
new Request.ReadStream (
......@@ -450,6 +451,8 @@ class ServerImpl implements TimeSource {
ServerImpl.this, chan
);
}
connection.raw = rawin;
connection.rawout = rawout;
}
Request req = new Request (rawin, rawout);
requestLine = req.requestLine();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册