mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1102923 - log node moz-spdy and moz-http2 output on shutdown r=ted
This commit is contained in:
parent
cf6b7dc423
commit
96f21bccf8
@ -90,17 +90,6 @@ function executeRunLater(arg) {
|
||||
}
|
||||
|
||||
function handleRequest(req, res) {
|
||||
try {
|
||||
realHandleRequest(req, res);
|
||||
} catch (e) {
|
||||
console.log("spdy server suffered unhandled exception. will restart " + e);
|
||||
var p = webServer.address().port;
|
||||
webServer.close();
|
||||
webServer = spdy.createServer(options, handleRequest).listen(p, "0.0.0.0", 200, listenok);
|
||||
}
|
||||
}
|
||||
|
||||
function realHandleRequest(req, res) {
|
||||
var u = url.parse(req.url);
|
||||
var content = getHttpContent(u.pathname);
|
||||
|
||||
@ -111,8 +100,6 @@ function realHandleRequest(req, res) {
|
||||
res.setHeader('X-Connection-Spdy', 'no');
|
||||
}
|
||||
|
||||
console.log(u.pathname);
|
||||
|
||||
if (u.pathname === '/750ms') {
|
||||
var rl = new runlater();
|
||||
rl.req = req;
|
||||
|
@ -949,7 +949,7 @@ class XPCShellTests(object):
|
||||
# We pipe stdin to node because the spdy server will exit when its
|
||||
# stdin reaches EOF
|
||||
process = Popen([nodeBin, serverJs], stdin=PIPE, stdout=PIPE,
|
||||
stderr=STDOUT, env=self.env, cwd=os.getcwd())
|
||||
stderr=PIPE, env=self.env, cwd=os.getcwd())
|
||||
self.nodeProc[name] = process
|
||||
|
||||
# Check to make sure the server starts properly by waiting for it to
|
||||
@ -979,7 +979,19 @@ class XPCShellTests(object):
|
||||
"""
|
||||
for name, proc in self.nodeProc.iteritems():
|
||||
self.log.info('Node %s server shutting down ...' % name)
|
||||
proc.terminate()
|
||||
if proc.poll() is not None:
|
||||
self.log.info('Node server %s already dead %s' % (name, proc.poll()))
|
||||
else:
|
||||
proc.terminate()
|
||||
def dumpOutput(fd, label):
|
||||
firstTime = True
|
||||
for msg in fd:
|
||||
if firstTime:
|
||||
firstTime = False;
|
||||
self.log.info('Process %s' % label)
|
||||
self.log.info(msg)
|
||||
dumpOutput(proc.stdout, "stdout")
|
||||
dumpOutput(proc.stderr, "stderr")
|
||||
|
||||
def buildXpcsRunArgs(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user