Added socket with handling unexpected security error