An employee filled a ton container with chlorine and attempted to unhook the fill line. The container valve was not shut at the time. He was able to quickly close it and prevent a release, but he breathed in chlorine vapors and suffered lung irritation.