Add a timeout when trying to connect to the server, otherwise sometimes it just hangs

Signed-off-by: Doug Davis <dug@us.ibm.com>
Merge pull request #8035 from duglin/Issue7965

Add timeout to client - fix for #7965