Fixed bugs.

1. Destroy all tcp connection before the app exit.
2. sleepSec -> sleepSeconds.