Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ class CallActivity : CallBaseActivity() {
private var externalSignalingServer: ExternalSignalingServer? = null
private var webSocketClient: WebSocketInstance? = null
private var webSocketConnectionHelper: WebSocketConnectionHelper? = null
private var joinRoomInitiated = false
private var hasMCU = false
private var hasExternalSignalingServer = false
private var conversationPassword: String? = null
Expand Down Expand Up @@ -1521,6 +1522,7 @@ class CallActivity : CallBaseActivity() {
.toSet()

private fun joinRoomAndCall() {
joinRoomInitiated = true
callSession = ApplicationWideCurrentRoomHolder.getInstance().session
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1))
Log.d(TAG, "joinRoomAndCall")
Expand Down Expand Up @@ -1874,7 +1876,11 @@ class CallActivity : CallBaseActivity() {
}

"roomJoined" -> {
Log.d(TAG, "onMessageEvent 'roomJoined'")
Log.d(TAG, "onMessageEvent 'roomJoined' joinRoomInitiated=$joinRoomInitiated")
if (!joinRoomInitiated) {
Log.d(TAG, "Ignoring stale roomJoined event (joinRoomAndCall not yet called)")
return
}
startSendingNick()
if (webSocketCommunicationEvent.getHashMap()!!["roomToken"] == roomToken) {
performCall()
Expand Down Expand Up @@ -1943,6 +1949,7 @@ class CallActivity : CallBaseActivity() {

private fun hangup(shutDownView: Boolean, endCallForAll: Boolean) {
Log.d(TAG, "hangup! shutDownView=$shutDownView")
joinRoomInitiated = false
if (shutDownView) {
setCallState(CallStatus.LEAVING)
}
Expand Down
Loading