add connection checking thread.