smc: socket closing and linkgroup cleanup