# Steam - Client Timeout (but works with NULL)

**URL:** <https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006>\
**Category:** Platform & Builds\
**Tags:** Networking, Steam, unreal-engine, session, question, CPP, travel\
**Created:** [January 3, 2016, 7:39pm UTC](https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006 "2016-01-03T19:39:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [January 3, 2016, 7:39pm UTC](https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006/1 "2016-01-03T19:39:46Z")

</div>

I have been working on getting sessions working with Steam.

I followed the following tutorial

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

I am testing this with 2 different steam accounts and computers. I can successfully see and join sessions that I create.

However, when I join a session it takes me to my MainMenu map instead of my Foo map.  
And then shows the connection getting TIMED OUT.

I have attached the server and client logs to this post.

SERVER LOG

CLIENT LOG

So within the client log I see the following

```
Browse: 192.168.1.129//Game/Maps/MainMenu
LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection.

```

However, the server travels to the correct map, “Foo”.  
My c++ code looks just like the tutorial for this

```
SessionSettings->Set(SETTING_MAPNAME, FString("Foo"), EOnlineDataAdvertisementType::ViaOnlineService);

UGameplayStatics::OpenLevel(GetWorld(), "Foo", true, "listen");

```

As you can see the server is calling **OpenLevel** with the “Foo” map and the “ **listen** ” parameter.

Within OnJoinSessionComplete I am calling **ClientTravel**. Which to my understanding should open the “Foo” map now that the server is on that map. However, as you can see from the logs it opens MainMenu.

```
void UFPSGameInstance::OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result)
{
	GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, FString::Printf(TEXT("OnJoinSessionComplete %s, %d"), *SessionName.ToString(), static_cast<int32>(Result)));

	// Get the OnlineSubsystem we want to work with
	IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
	if (OnlineSub)
	{
		// Get SessionInterface from the OnlineSubsystem
		IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();

		if (Sessions.IsValid())
		{
			// Clear the Delegate again
			Sessions->ClearOnJoinSessionCompleteDelegate_Handle(OnJoinSessionCompleteDelegateHandle);

			APlayerController * const PlayerController = GetFirstLocalPlayerController();

			FString TravelURL;

			if (PlayerController && Sessions->GetResolvedConnectString(SessionName, TravelURL))
			{
				GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, TravelURL);
				PlayerController->ClientTravel(TravelURL, ETravelType::TRAVEL_Absolute);
			}
		}
	}
}

```

The TravelURL is being output as the following, which is my server’s IP address.

```
192.168.1.129:7777

```

Does anyone know why it is going to the WRONG map? And why I’m getting the timeout?  
Will OpenLevel and ClientTravel work like this? Or do I need to use ServerTravel instead of OpenLevel?

**Edit:  
I tested this against the NULL subsystem instead of Steam and it all works correctly. The client doesn’t timeout and is put into the correct “Foo” level.**

Edit2:  
I tried replacing

```
UGameplayStatics::OpenLevel(GetWorld(), "Foo", true, "listen");

```

with

```
GetWorld()->ServerTravel(TEXT("/Game/Maps/Foo?listen"));

```

But I get the same behavior as before.

Also, I should note that when using Steam I get 9,999 for the PingInMs session property. But when I use NULL I get correct ping results. I’m not sure if this is related.

I am able to ping the server from the client via cmd just fine. (and the other way around)  
As well as run a tracert both ways.

Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_32ce1bb6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_32ce1bb6](https://forums.unrealengine.com/u/anonymous_user_32ce1bb6)\
**Post date:** [January 28, 2016, 1:54pm UTC](https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006/2 "2016-01-28T13:54:58Z")

</div>

I have the exact same problem. Do you have already found a solution or workaround?

I figured out that the server does not welcome the player. So the client does not know where to travel.

It should look like this:

```
LogNet: Welcomed by server (Level: /Game/CatchHunt/Maps/UEDPIE_1_Default, Game: /Game/CatchHunt/Blueprints/Game/BP_CatchHuntGameMode.BP_CatchHuntGameMode_C)
LogLoad: LoadMap: 127.0.0.1//Game/CatchHunt/Maps/UEDPIE_1_Default?game=/Game/CatchHunt/Blueprints/Game/BP_CatchHuntGameMode.BP_CatchHuntGameMode_C

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_32ce1bb6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_32ce1bb6](https://forums.unrealengine.com/u/anonymous_user_32ce1bb6)\
**Post date:** [January 28, 2016, 10:28pm UTC](https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006/3 "2016-01-28T22:28:54Z")

</div>

I found the solution!

You just need to add the `bIsLanMatch	` option to your open level call on the server.  
Like this:

```
UGameplayStatics::OpenLevel(GetWorld(), "Foo", true, "listen?bIsLanMatch=1");

```

[More server options](https://docs.unrealengine.com/latest/INT/Programming/Basics/CommandLineArguments/index.html#serveroptions)

Hope it works for you as well.

---

<div class="post-metadata">

**Author:** ![Hidjy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hidjy](https://forums.unrealengine.com/u/Hidjy)\
**Post date:** [August 5, 2017, 9:31pm UTC](https://forums.unrealengine.com/t/steam-client-timeout-but-works-with-null/343006/4 "2017-08-05T21:31:41Z")

</div>

I had the same issue and this fixed it, but **only in the lan case**.  
When I tried to join a steam session over internet, the same timeout issue appeared.

I just lost my afternoon on this, so I’ll share the fix here 🙂

In the case of an internet steam session, you actually need NOT to mention the bIsLanMatch at all, like this:

```
UGameplayStatics::OpenLevel(GetWorld(), "Foo", true, String::Printf(TEXT("listen%s"), bIsLanMatch ? TEXT("?bIsLanMatch=1") : TEXT("")));

```

Not sure if this is a bug.
