Small socket changes

Maintenance to eliminate crashes from unsuccessful connections.