fix bug when remote close conn