# How to cancel Client Traveling ?

**URL:** <https://forums.unrealengine.com/t/how-to-cancel-client-traveling/835825>\
**Category:** Multiplayer & Networking\
**Tags:** unreal-engine, CPP, question\
**Created:** [March 31, 2023, 3:40pm UTC](https://forums.unrealengine.com/t/how-to-cancel-client-traveling/835825 "2023-03-31T15:40:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dz-S.T.A.L](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dz-S.T.A.L](https://forums.unrealengine.com/u/Dz-S.T.A.L)\
**Post date:** [March 31, 2023, 3:40pm UTC](https://forums.unrealengine.com/t/how-to-cancel-client-traveling/835825/1 "2023-03-31T15:40:17Z")

</div>

I created a function in C++ to make the client connect to a server by IP :

```auto
if (GetGameInstance() && GetGameInstance()->GetFirstLocalPlayerController())
		GetGameInstance()->GetFirstLocalPlayerController()->ClientTravel("192.168.22.31", ETravelType::TRAVEL_Absolute);

```

the issue here is if the server is not running, it keep trying to connect, here’s the log :  
`LogNet: Initial Connect Diagnostics: Sent '9' packets in last '10.004943' seconds, no packets received yet.`

How do i cancel that ?

---

<div class="post-metadata">

**Author:** ![Dz-S.T.A.L](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dz-S.T.A.L](https://forums.unrealengine.com/u/Dz-S.T.A.L)\
**Post date:** [April 1, 2023, 5:25am UTC](https://forums.unrealengine.com/t/how-to-cancel-client-traveling/835825/2 "2023-04-01T05:25:10Z")

</div>

I found the solution if someone is interested in it, if you go to PostInitProperties function in NetDriver.cpp you will find :

```auto
#if WITH_EDITOR
		// Do not time out in PIE since the server is local.
		bNoTimeouts = bNoTimeouts || (GEditor && GEditor->PlayWorld);
#endif // WITH_EDITOR

```

to solve this issue you must modify this line and build the engine.
