removed crappy "when socket open" code