io: fix KeepAliveWriter behavior on empty writes