Adding support for multi socket initialization and close