Merged changes from the 4.2.0 branch to fix another issue found by QA regression tests from trq-1425 --had to split the client and server settings for a socket.