Remove sockets on main shutdown