ta-client: add pool purge

Signed-off-by: Tw <tw19881113@gmail.com>
ta-client: handle connection close

Signed-off-by: Tw <tw19881113@gmail.com>