nl_tokens: The middleware function does include the next callback so only resolve the Promise when it s called . If it s never called the middleware stack completion will stall
pl_tokens: function withCallbackHandler ( ctx , connectMiddleware , next ) { return new Promise ( ( resolve , reject ) => { connectMiddleware ( ctx . req , ctx . res , err => { if ( <mask> ) reject ( err ) else resolve ( next ( ) ) } ) } ) }