use rwmutex in websocket