if ($sockerr) { echo -a Error. halt sockclose $sockname }
A error: It stop the script before it close it change the halt and the sockclose