Revert "Revert "client Thread""

This reverts commit 29ededb8ccc357b8bb232cecfc437c0f7d5a85d9.