0
這是我RoomSettingsSmartfox iOS的 - 不能加入房間
let roomSettings = RoomSettings(name: "room \(rooms.count + 1)")
roomSettings.maxUsers = 10
smartFox.send(CreateRoomRequest(roomSettings: roomSettings, autoJoin: false, roomToLeave: nil))
加入房間要求
func joinRoom(room : Room, callback : (Result ->())?)
{
pendingCallbacks[TaskType.JoinRoom] = callback
smartFox.send(JoinRoomRequest(id: room.id()))
}
創建房間後,我一下就可以加入,但會出現奇怪的例外,我真不不知道會發生什麼
21:07:18,545 ERROR [SFSWorker:Sys:4] v290.SystemReqController - Cannot find a controller command for request ID: 3
21:07:18,546 WARN [SFSWorker:Sys:4] v290.SystemReqController - java.lang.NullPointerException
java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1124)
com.smartfoxserver.v2.controllers.v290.SystemReqController.processRequest(SystemReqController.java:146)
com.smartfoxserver.v2.controllers.v290.SystemReqController.enqueueRequest(SystemReqController.java:119)
com.smartfoxserver.bitswarm.io.protocols.AbstractProtocolCodec.dispatchRequestToController(AbstractProtocolCodec.java:39)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.dispatchRequest(SFSProtocolCodec.java:133)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.onPacketRead(SFSProtocolCodec.java:90)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler$1.run(BinaryIoHandler.java:477)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
你能告訴我如何解決這個問題嗎?
我用smartfox服務器2.10.0和smartfox客戶ObjC 1.6.0
我是一個誰問這個問題之後,我想出一個辦法。我應該在評論區留下這個答案還是留在這裏? – Gintama
確定 - 刪除問題或接受您自己的答案。 – Strawberry