인게임서버 접속 응답이 오지 않습니다.

문의 응대 : 평일 오전 10시 ~ 오후 6시
문의를 남기실 경우 다음 항목을 작성해 주세요.
정보가 부족하거나 응대시간 외 문의하는 경우 확인 및 답변이 지연될 수 있습니다.

  • 뒤끝 SDK 버전 : SDK Version Backend-5.7.2 [2022-05-24]
  • 프로젝트명 : Pang
  • 스테이터스 코드 :
  • 에러 코드 :
  • 에러 메시지 :
Backend.Match.OnMatchMakingResponse += (MatchMakingResponseEventArgs args) => {
            if (args.ErrInfo == ErrorCode.Match_InProgress)
            {
                Debug.Log("매칭 신청 성공 응답 받음");


            }
            else if (args.ErrInfo == ErrorCode.Success)
            {
                Debug.Log("매칭 완료 응답 받음");

                string serverAddress = args.RoomInfo.m_inGameServerEndPoint.m_address;
                ushort serverPort = args.RoomInfo.m_inGameServerEndPoint.m_port;

                bool isReconnect = true;
                ErrorInfo errorInfo = null;

                RoomInfo = args.RoomInfo;

                if (Backend.Match.JoinGameServer(serverAddress, serverPort, isReconnect, out errorInfo) == false)
                {
                    // 인게임 서버 연결 실패!
                    Debug.LogError("serverAddress: " + serverAddress);
                    Debug.LogError("serverPort: " + serverPort);
                    Debug.LogError("인게임 서버 연결 실패!" + errorInfo);
                    return;
                }
                else
                {
                    Debug.Log("게임 서버 접속 소켓연결 성공");
                    Debug.Log("serverAddress: " + serverAddress);
                    Debug.Log("serverPort: " + serverPort);
                    gameObject.SetActive(false);
                }
            }
            else
            {
                // 매칭 신청 실패!
                Debug.LogError("매칭 신청 실패!" + args.ErrInfo);
            }
        };

        Backend.Match.OnSessionJoinInServer = (args) =>
        {
            if (args.ErrInfo.Category == ErrorCode.Success)
            {
                Debug.Log("인게임 서버 접속 응답 받음");
                Backend.Match.JoinGameRoom(RoomInfo.m_inGameRoomToken);
            }
            else
            {
                Debug.LogError("인게임 서버 접속 실패!" + args.ErrInfo);
            }
        };

다른 이벤트들은 다 잘되고
OnMatchMakingResponse에서 Match_InProgress, Success 상태 다 받았는데
Success 상태일때 인게임 서버 소캣 연결 함수 뒤에

Backend.Match.OnSessionJoinInServer 해당 이벤트가 불리지 않습니다. 검색해도 이유가 나오지 않아 문의 드립니다.

안녕하세요 개발자님.

예측되는 상황은 OnSessionJoinInServer에서의 에러 처리가 잘못되어있거나 JoinGameServer의 isReconnect가 잘못 설정되어있어 발생하는 것으로 추정됩니다.

JoinGameServer의 인자값, isReconnect를 false로 변경해주시고,
OnSessionJoinInServer에서 에러 처리를 args.ErrInfo != ErrorInfo.Success로 변경해주세요.

bool isReconnect = false;
ErrorInfo errorInfo = null;

RoomInfo = args.RoomInfo;

if (Backend.Match.JoinGameServer(serverAddress, serverPort, isReconnect, out errorInfo) == false)
        Backend.Match.OnSessionJoinInServer = (args) =>
        {
            if (args.ErrInfo == ErrorInfo.Success)
            {
                Debug.Log("인게임 서버 접속 응답 받음");
                Backend.Match.JoinGameRoom(RoomInfo.m_inGameRoomToken);
            }
            else
            {
                Debug.LogError("인게임 서버 접속 실패!" + args.ErrInfo);
            }
        };

원인을 찾았습니다. 감사합니다.

좋아요 1