io: keepalive writer shouldn't freeze after writing errors