There's a shutdown boolean being used globally in p2p to trigger shutdown. We may want to get rid of this and find a cleaner way to do it.