fix closa() bug on sockets