[Worker] Fix a session number for handshakes/heartbeats.