03-05-2020 03:58 PM
[2020.01.31-05.58.18:173][ 56]LogNet: Verbose: 1433034680154146 changed network connection state
[2020.01.31-05.58.18:173][ 56]LogNet: Warning: Cannot reopen a closed connection to 1433034680154146
[2020.01.31-05.57.57:206][909]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 1433034680154146.oculus, Name: OculusNetConnection_2147482424, Driver: GameNetDriver OculusNetDriver_2147482539, IsServer: YES, PC: PlayerController_2147482420, Owner: PlayerController_2147482420, UniqueId: Oculus:ovrID:1433034680154146
[2020.01.31-05.57.57:206][909]LogNet: Verbose: UNetConnection::SetClientLoginState: State changing from ReceivedJoin to CleanedUp
[2020.01.31-05.57.29:442][756]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 1433034680154146.oculus, Name: OculusNetConnection_2147482453, Driver: GameNetDriver OculusNetDriver_2147482539, IsServer: YES, PC: PlayerController_2147482449, Owner: PlayerController_2147482449, UniqueId: Oculus:ovrID:1433034680154146
[2020.01.31-05.57.29:442][756]LogNet: Verbose: UNetConnection::SetClientLoginState: State changing from ReceivedJoin to CleanedUp
[2020.01.31-05.57.38:324][ 88]LogNet: Verbose: UNetConnection::SetClientLoginState: State same: CleanedUp
diff --git a/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetConnection.h b/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetConnection.h
index d482315..d0cc5bb 100644
--- a/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetConnection.h
+++ b/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetConnection.h
@@ -29,6 +29,7 @@ public:
FString LowLevelGetRemoteAddress(bool bAppendPort = false) override;
FString LowLevelDescribe() override;
virtual void FinishDestroy() override;
+ virtual void CleanUp() override;^M virtual FString RemoteAddressToString() override;
// End NetConnection Interface
diff --git a/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetDriver.h b/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetDriver.h
index b894646..158f5fa 100644
--- a/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetDriver.h
+++ b/Plugins/Online/OnlineSubsystemOculus/Source/Classes/OculusNetDriver.h
@@ -45,4 +45,6 @@ public:
void OnNewNetworkingPeerRequest(ovrMessageHandle Message, bool bIsError); void OnNetworkingConnectionStateChange(ovrMessageHandle Message, bool bIsError);
+^M
+ bool RemoveConnection(uint64 PeerID);^M
};
diff --git a/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetConnection.cpp b/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetConnection.cpp
index 880db83..f750de5 100644
--- a/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetConnection.cpp
+++ b/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetConnection.cpp
@@ -1,6 +1,7 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. #include "OculusNetConnection.h"
+#include "OculusNetDriver.h"^M
#include "OnlineSubsystemOculusPrivate.h" #include "IPAddressOculus.h"
@@ -156,6 +157,21 @@ void UOculusNetConnection::FinishDestroy()
}
}+void UOculusNetConnection::CleanUp()^M
+{^M
+ if (bIsPassThrough)^M
+ {^M
+ UIpConnection::CleanUp();^M
+ return;^M
+ }^M
+^M
+ if (Driver != nullptr)^M
+ {^M
+ reinterpret_cast<UOculusNetDriver*>(Driver)->RemoveConnection(PeerID);^M
+ }^M
+ UNetConnection::CleanUp();^M
+}^M
+^M
FString UOculusNetConnection::RemoteAddressToString()
{
if (bIsPassThrough)
diff --git a/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp b/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp
index ee5be0f..73a3789 100644
--- a/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp
+++ b/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp
@@ -513,3 +513,15 @@ bool UOculusNetDriver::IsNetResourceValid()
// The clients need to wait until the connection is established before sending packets
return ServerConnection->State == EConnectionState::USOCK_Open;
}
+^M
+bool UOculusNetDriver::RemoveConnection(uint64 PeerID)^M
+{^M
+ if (!Connections.Contains(PeerID))^M
+ {^M
+ UE_LOG(LogNet, Warning, TEXT("Connections doesn't have the PeerID"))^M
+ return false;^M
+ }^M
+^M
+ Connections.Remove(PeerID);^M
+ return true;^M
+}
03-05-2020 04:02 PM
03-10-2020 02:35 PM
03-12-2020 05:15 PM
I have also made the following changes to OnlineSubsytemOculus.
==============================================
https://issues.unrealengine.com/issue/UE-82549
==============================================
Otherwise I could not connect.
01-09-2022 10:21 AM
Any luck getting this to work with 4.27?
01-31-2022 09:04 AM
bump for 4.27? Does anyone have a fix?