fix unstable get_peername function issue