fixed bug when getting request ip after connection is closed