Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/188982
Change subject: Attach the finish handler sooner
......................................................................
Attach the finish handler sooner
* Wasn't getting called, resulting in fatal logs not exiting.
Change-Id: Id55903b56ee9be0a82b975cd7f264125fa9b6c85
---
M api/routes.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/82/188982/1
diff --git a/api/routes.js b/api/routes.js
index 35c1eca..8fbcd65 100644
--- a/api/routes.js
+++ b/api/routes.js
@@ -460,9 +460,9 @@
function errBack( env, logData, callback ) {
if ( !env.responseSent ) {
return new Promise(function( resolve, reject ) {
+ res.once( 'finish', resolve );
apiUtils.setHeader( res, env, 'Content-Type',
'text/plain; charset=UTF-8' );
apiUtils.sendResponse( res, env,
logData.fullMsg(), logData.flatLogObject().code || 500 );
- res.once( 'finish', resolve );
}).catch(function(e) {
console.error( e.stack || e );
res.end( e.stack || e );
--
To view, visit https://gerrit.wikimedia.org/r/188982
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id55903b56ee9be0a82b975cd7f264125fa9b6c85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits