Shutdown socket properly