Ensures sockets is initialized only once.