fixed the bug that the udp socket won't continue to receive data if there is any exception thrown