fix bug SocketDispatcher
write js test code