stream: do not write after FIN
1.17.4