recreate socket when disconnected