Don't close socket handles, just leave that job for garbage collector, as doing it manually seems to be the cause of server hangs
foreach(dir "Bamboo" "BambooPlinko" "Bath" "Castle" "cheese" "EarthRise" "Hedgewars" "Hedgelove" "Hydrant" "Lonely_Island" "mushrooms" "PirateFlag" "Plane" "Sheep")
add_subdirectory(${dir})
endforeach(dir)