fix crash with USE_MSG_THREAD = 0

Signed-off-by: xiehuc <xiehuc@gmail.com>