fixed the bug that the udp socket won't continue to receive data if there is any exception thrown
separated session creating and session registering