fix socket leak in mstat.lua