Wraps res.end() so that a response whose request wrote anything is sent
only once those writes have committed; one that wrote nothing is sent at
once, and one whose commit FAILED is answered 503 instead (#351).
Parameters
res: any
the response
arrival: any
the store's write position when the request arrived, or
null for a persistence module without positions
req: any
the request, whose method decides whether a refused write
still waiting for its retry holds it too; optional
Wraps
res.end()so that a response whose request wrote anything is sent only once those writes have committed; one that wrote nothing is sent at once, and one whose commit FAILED is answered 503 instead (#351).