can you change this to `if (res.headersSent || !res.socket.writable) return;`? `return res` isn't necessary here. 

you could also move it up closer to `yield next`