Flush pending queue before closing actor.