fix token dead lock issue and use unique connection