close sock in ERREND