fix issue of multiple socket listeners