fixed socket closing on config change