Added socket double to remove redundant test code.