Fix issue with pipe calling end prematurely on http writable streams