# Destroy session returns with Failure

**URL:** <https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375>\
**Category:** World Creation\
**Tags:** Destroy, Networking, unreal-engine, Physics, session, bug-report, question\
**Created:** [November 15, 2016, 6:09pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375 "2016-11-15T18:09:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [November 15, 2016, 6:09pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/1 "2016-11-15T18:09:38Z")

</div>

Hi!

DestroySession node doesn’t seem to work properly! I tried to call it from the playercontroller of the server/client, gamemode, but it always return with OnFailure.

As far as I can tell, it’s not a new problem, found a few other questions that may be about this:

> **[Cannot join or create a session after leaving one.](https://forums.unrealengine.com/questions/345423/cannot-join-or-create-a-session-after-leaving-one.html)**
>
> After leaving a session in my game I cannot join, find, and create a session again. The only way to fix this is to restart the game. When I try to create a server or join one this shows up on the log. \[2015.12.10-22.04.33:199\]\[502\]LogOnline:Warning:...

> **[r/unrealengine - \[Help\] Cannot join or create a session after leaving one.](https://www.reddit.com/r/unrealengine/comments/3wawys/help_cannot_join_or_create_a_session_after/)**
>
> 2 votes and 3 comments so far on Reddit

If I’m wrong and it’s not a bug, then what could cause the problem for me?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [November 21, 2016, 6:49pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/2 "2016-11-21T18:49:21Z")

</div>

Hey CrimsonHawk,

Sorry for the delay. I’ve reproduced your issue, and have entered a bug report which you can track using the link below:

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-38897)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

Thank you for your report.

Have a great day

---

<div class="post-metadata">

**Author:** ![BDC\_Patrick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bdc_patrick/32/1104221_2.png) [@BDC\_Patrick](https://forums.unrealengine.com/u/BDC_Patrick)\
**Post date:** [January 30, 2017, 10:35am UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/3 "2017-01-30T10:35:37Z")

</div>

Same Problem here with EndSession/DestroySession using Steam OSS and AdvancedSession…

Any idea if it will be fixed in 4.15, since it is really annoying to Continuously needing to leave the whole game to End Sessions 😕

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [January 30, 2017, 2:18pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/4 "2017-01-30T14:18:34Z")

</div>

Unfortunately, there is no set timeline for when a fix will be released.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [February 2, 2017, 12:12pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/5 "2017-02-02T12:12:29Z")

</div>

At the link, you it is written “Unable to test in 4.15 Main CL# 3205566 due to a consistent failure to join session error.” Is it still the case, or just wasn’t checked since because of the Backlogging?  
And if you can’t leave a session just like that, then how do other developers solve the problem of disconnecting from a server? (Like Gears of War for a big example)

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [February 2, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/6 "2017-02-02T15:06:10Z")

</div>

The issue is still marked as backlogged for the time being. I tested it and the issue is still occurring in 4.15.

As far as a way to work around the issue, I am not aware of any at this time. If one is discovered, I’ll be sure to respond to this thread with more information.

Have a great day

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3645a83d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3645a83d](https://forums.unrealengine.com/u/anonymous_user_3645a83d)\
**Post date:** [March 15, 2017, 3:23pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/7 "2017-03-15T15:23:48Z")

</div>

I believe I have a work-around, I had the issue, and I called a “Destroy Session” function right before the create session for the host, and it created the session as expected.

 ![130161-screenshot_031517_111026_am.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/7/b478589010e2744f5d0b539eabc5714704cc8a4e.jpeg)

I believe is has to do with the multi-threading nature of the UE4, when it tries to delete the session it’s probably waiting on access from another thread, and it can’t get access to it, so it fails out. But when called before the creation, the NetController is fully destroyed therefor exiting out of all those resources held by those busy threads, so it probably doesn’t has that problem.

Again that explanation is a estimate, but I believe it makes sense.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [March 15, 2017, 8:32pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/8 "2017-03-15T20:32:23Z")

</div>

So you are telling me, the Destroy Session should work as long as I put a Create Session right after it? How about when I don’t want to be in any sessions? Like return to Main Menu or such. Should I make a session with a sole connection anyway?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_185647b1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_185647b1](https://forums.unrealengine.com/u/anonymous_user_185647b1)\
**Post date:** [July 4, 2017, 3:54am UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/9 "2017-07-04T03:54:35Z")

</div>

Can we please get a fix for this higher in priority? Unreal is my favorite game Engine, and continues to improve year after year; but the multiplayer genre isn’t using it as often as it could be. I’m sure Unreal wants to see more multiplayer games using their Engine in the market. Right now multiplayer functionality is very clunky, and bugs in core functionality like this, as well as other issues with tutorials and documentation, make it hard for us to get our games out.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [July 4, 2017, 8:59am UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/10 "2017-07-04T08:59:52Z")

</div>

I can’t believe the “won’t fix” status either. If an engine offers multiplayer, this should be a must “feature”

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [July 5, 2017, 2:35pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/11 "2017-07-05T14:35:31Z")

</div>

This seems to currently be working in my test project, although it is using Steam. What OSS are you working with, CrimsonHawk?

If you’re still seeing the issue and I can reproduce it I can go ahead and reopen the ticket.

Thanks

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [July 6, 2017, 3:53pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/12 "2017-07-06T15:53:08Z")

</div>

To be honest, I haven’t checked in the new versions, I was just hoping that by the time it will be unavoidable to implement it, it will be fixed. All I can see now is the ticket saying “won’t fix”. But if it works now despite the label on the ticket, then I apologise for the harshness, and I will check it out on the weekend with 4.16.2!

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [July 28, 2017, 7:45am UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/13 "2017-07-28T07:45:07Z")

</div>

Took a bit longer than expected to try it out again. But it still doesn’t work as I’d expect. I’m using Win 10, and Steam.

1. On Destroy Session nothing seems to happen, even if it returns with Success.
2. If I follow JWYanick’s guide, I could exit to the Main menu by creating a session with 0 public connections, and Open its level.
3. But upon leaving the session this way I can’t get start another game session even if I call Destroy Session before. Server creation ends with failure.

Could you share your test project? It might be that we don’t use this function exactly how it is intended.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [August 6, 2017, 5:00pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/14 "2017-08-06T17:00:48Z")

</div>

Or could you reopen the ticket?

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [August 11, 2017, 4:47pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/15 "2017-08-11T16:47:28Z")

</div>

Hey CrimsonHawk, I’ve tested this and confirmed the behavior you’re seeing. I went ahead and reopened the ticket as a result.

Thanks for your report, and for your patience.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [August 13, 2017, 10:56pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/16 "2017-08-13T22:56:56Z")

</div>

Thank you! Could you also update the versions also? (that it’s still a problem in 4.16)

---

<div class="post-metadata">

**Author:** ![gothicserpent](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gothicserpent/32/896180_2.png) [@gothicserpent](https://forums.unrealengine.com/u/gothicserpent)\
**Post date:** [December 15, 2017, 9:27pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/17 "2017-12-15T21:27:12Z")

</div>

this worked for me after trying in like 20 different ways to destroy the session on the client. important to destroy session before creating a session on the host server!

 ![223926-success.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/4/824e42a9e5ac781b6afe680b201c18f0a8d34f52.jpeg)

---

<div class="post-metadata">

**Author:** ![VictorBurgos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorburgos/32/1008648_2.png) [@VictorBurgos](https://forums.unrealengine.com/u/VictorBurgos)\
**Post date:** [March 30, 2018, 5:22am UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/18 "2018-03-30T05:22:46Z")

</div>

I am getting this as well in 4.18. Supposedly I see in the ticket, this is a target fix for 4.20… I mean, this is stuff that shouldn’t be broken in UE4 in 2018. The rest of OSS and especially OSS Steam should be 100% good to go. But we are still waiting on things like this: [Advanced Sessions Plugin - Community Content, Tools and Tutorials - Unreal Engine Forums](https://forums.unrealengine.com/community/community-content-tools-and-tutorials/41043-advanced-sessions-plugin) to be fully implemented into the engine by default… or even full wrapper like UWorks but with actual OSS support.

I know Epic doesn’t have any plan on putting games on Steam, so it may not be High Priority for Epic, but I would guess that at least 90% of your userbase **WILL** be using Steam.

---

<div class="post-metadata">

**Author:** ![CRY3Modder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CRY3Modder](https://forums.unrealengine.com/u/CRY3Modder)\
**Post date:** [January 27, 2019, 5:05pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/19 "2019-01-27T17:05:52Z")

</div>

Change Nodes in your Game Mode. Event On Log Out. Makes such… Thing or Bug.  
If there are any already Destroy Session

---

<div class="post-metadata">

**Author:** ![Kucki](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kucki/32/924088_2.png) [@Kucki](https://forums.unrealengine.com/u/Kucki)\
**Post date:** [June 26, 2019, 7:56pm UTC](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375/20 "2019-06-26T19:56:21Z")

</div>

It’s still not working. 4.22

[Next page](https://forums.unrealengine.com/t/destroy-session-returns-with-failure/376375.md?page=2)
