close properly SSE stream on client side