Made sure old sockets are shutdown before opening new one.