close sockets before shutdown’