So I have a multiplayer game with a listen server set up (UE 5.2). I am using EOS for this.
I am able to successfully create, find, and join sessions.
Here is the issue…
When a client joins, and then decides to leave mid-game (either by exiting the game or returning to the main menu via OpenLevel), the server also leaves the game session along with the client!
Here are the server logs when the client leaves:
[2023.11.23-01.13.18:895][261]LogOnline: OSS: EOSSDK-LogEOSP2P: Closing connection with peer, as there are no longer any accepted connections. RemoteUserId=[000…476]
[2023.11.23-01.13.18:895][261]LogOnline: OSS: EOSSDK-LogEOSP2P: PeerConnection is being closed. LocalUserId=[000…d27] RemoteUserId=[000…476] SessionGuid=[kf5bNhrjWki6nrsoX14_Eg] State=[Connected] SignalingState=[Stable] ConnectionState=[IceConnectionConnected] Reason=[ClosedLocally]
[2023.11.23-01.13.18:895][261]LogOnline: OSS: EOSSDK-LogEOSP2P: Connection closed. LocalUserId=[000…d27] RemoteUserId=[000…476] SocketId=[GameSession] Reason=[ClosedLocally]
[2023.11.23-01.13.18:895][261]LogOnline: OSS: EOSSDK-LogEOSP2P: Closed a connection with a peer. LocalUserId=[000…d27] RemoteUserId=[000…476] SocketId=[GameSession] SessionGuid=[kf5bNhrjWki6nrsoX14_Eg]
[2023.11.23-01.13.18:895][261]LogOnline: OSS: EOSSDK-LogEOSP2P: Removed peer. LocalUserId=[000…d27] RemoteUserId=[000…476]
Here are the client logs:
[2023.11.23-01.13.18:855][523]LogNet: World NetDriver shutdown NetDriverEOSCore_0 [GameNetDriver]
[2023.11.23-01.13.18:855][523]LogNet: DestroyNamedNetDriver NetDriverEOSCore_0 [GameNetDriver]
[2023.11.23-01.13.18:857][523]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: EOS:0002ac33e0d14f36b2e1889728d98d27:GameSession:97, Name: NetConnectionEOSCore_0, Driver: GameNetDriver NetDriverEOSCore_0, IsServer: NO, PC: BP_ShooterPlayerController_C_0, Owner: BP_ShooterPlayerController_C_0, UniqueId: EOSCore:17aa7647f4d74a6285324eef980d9520|000232f2374b437cb9ca55a669e72476, Channels: 70, Time: 2023.11.23-01.13.18
[2023.11.23-01.13.18:857][523]LogNet: UChannel::Close: Sending CloseBunch.
[2023.11.23-01.13.18:859][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Closing connection with peer, as there are no longer any accepted connections. RemoteUserId=[000…d27]
[2023.11.23-01.13.18:859][523]LogOnline: OSS: EOSSDK-LogEOSP2P: PeerConnection is being closed. LocalUserId=[000…476] RemoteUserId=[000…d27] SessionGuid=[kf5bNhrjWki6nrsoX14_Eg] State=[Connected] SignalingState=[Stable] ConnectionState=[IceConnectionConnected] Reason=[ClosedLocally]
[2023.11.23-01.13.18:859][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Connection closed. LocalUserId=[000…476] RemoteUserId=[000…d27] SocketId=[GameSession] Reason=[ClosedLocally]
[2023.11.23-01.13.18:859][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Closed a connection with a peer. LocalUserId=[000…476] RemoteUserId=[000…d27] SocketId=[GameSession] SessionGuid=[kf5bNhrjWki6nrsoX14_Eg]
[2023.11.23-01.13.18:860][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Removed peer. LocalUserId=[000…476] RemoteUserId=[000…d27]
[2023.11.23-01.13.18:864][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Successfully closed last connection closed listener for this socket. LocalUserId=[000…476] SocketId=[GameSession] NotificationId=[55]
[2023.11.23-01.13.18:864][523]LogOnline: OSS: EOSSDK-LogEOSP2P: Closing a specific socket id with all peers. LocalUserId=[000…476] SocketId=[GameSession]
What the heck is going on?