fix bug with reconnection

Before, resending acknowledge uses a hardcoded client ID.
To support reconnection, the client ID cannot be hardcoded.