Fix for UE-239936 Steam Sockets cannot create listen socket during non-seamless server travel

Hi all,

I was running into an error when trying to server travel using steam networking:

After searching I managed to find https://issues.unrealengine.com/issue/UE-239936 , which states “The issue does not occur when FSteamSocketsSubsystem::CleanSocketInformation is called after unloading the previous world.” yet doesn’t give an exact location. I have found a working location for this fix.

Note that you have to make CleanSocketInformation public inside of SteamSocketsSubsystem.h. I believe this is okay because the only other place CleanSocketInformation is exposed is through command line arguments.
Now my logs are without error:

This fixed my server travel for my p2p host. However I have not yet thoroughly tested this fix with multiple clients. Hopefully this saves you some time.

Warm regards,

Seventh Eye Studio

Check out our game Ascent of Eternity on EGS or Steam!

Hey there @SeventhEyeStudio! Welcome to the community! Amazing work with this fix. Have you submitted this as a PR to the Github?

Hi, I went ahead and made some PRs for this. I had to do it through the web since I’m on 5.4. https://github.com/EpicGames/UnrealEngine/pull/14440

https://github.com/EpicGames/UnrealEngine/pull/14441

I wasn’t able to edit two files on a single commit in the github web editor.
Apologies if this is not ideal.

Great work! It’s possible the reviewers will accept multiple PRs (assuming they work independently as well) but it is a bit unusual in this format so you may receive questions. Github should have automatically followed the PR for you, but I’d double check you have email notifications on in case a reviewer has questions/changes. Thanks for contributing to the engine!

Unfortunately, this cause client crash on disconnect. Someone has posted more details on the PR page.

Posting hack fix for the infinite recursion. It’s probably better to add a separate duplicate function. Sometime after release ill make a better PR with a function.

@SeventhEyeStudio I just wanted to say THANK YOU SO MUCH for seemingly being the only Dev who tries to fix this critical game breaking issue that many of us Indie developers are experiencing!

If it’s not too much to ask. Would it be possible for you to pressure Epic to push this fix through for 5.8?

You are very welcome! I believe if one of the epic engine dev’s notices this post they can easily clean this up. If its not noticed, I will create a better PR sometime after Ascent of Eternity is released. In the meantime it’s definitely low hanging fruit.

@SeventhEyeStudio Thank you for the solution! I have a question, it removed the error but if I m trying to NonSeamlessTravel to another map with a client using SteamSockets, by the looks of it, client immediately tries to reconnect when server still has previos netdriver and gets kicked.

Server tells:

NotifyAcceptingConnection: Server MapName refused [2026.05.21-23.18.33:256][499]LogSteamSocketsAPI: Verbose: SteamSockets API: Log [#12313P2P steamid:123456 vport 7777] closed by app before we got connected (1000) Connection rejected

I’ve artificially blocked client until the server loads onto new map before client asks for a join, and everything went fine. So looks like that’s the problem. Have you encountered something like this? Are you able to NonSeamless Travel with clients on your end?

You are welcome! Unfortunately steam lobbies has been giving me some issues. Meaning that although I can create and travel on sessions I’m unable to do matchmaking. So I haven’t been able to use multiplayer on steam. Everything works great on EoS and my subsystem using lyra and common user should be plug and play. However, I believe the transition from ossv1 to ossv2 may be at the root of my problems. Given that I’m using UE5.4 it is difficult to find the correct configuration information. I have been attempting to use ossv2 for steam since its working for eos, yet it failed to make a lobby with many configurations. I believe i did get a lobby initialized with ossv1 as one of my tested configurations but the sessions were broken. Ultimately I may not even end up using steam sockets. Really this is my only big blocker for release but its a bit of a hassle to test.

Its good to see you have it working, could be a short timeout with a large map load. Try increasing the timeout? What does the client say?