fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Faster to quit and start again after disconnecting than waiting

Open airbon99 opened this issue 7 months ago • 4 comments

What happened?

For years to this day, it's faster to quit the game and start again than waiting for game to shut down after disconnecting from a server.

Is there a reason for this?

Expected result

You should seamlessly connect to a server

Reproduction steps

  1. Open FiveM
  2. Connect and load into a server
  3. Disconnect
  4. Try connecting to the same or another server
  5. It presents with a long "waiting for game to shut down"

Currently it's faster:

  1. Quit
  2. Open FiveM
  3. Connect to the same or another server

Importancy

There's a workaround

Area(s)

FiveM

Specific version(s)

FiveM

Additional information

No response

airbon99 avatar May 23 '25 09:05 airbon99

FiveM is busy in the background cleaning up "stuff" when this happens. Not sure what it's exactly cleaning up, though the code is opensource so you can check it out yourself I guess

yorick2002 avatar May 27 '25 19:05 yorick2002

I'm not sure if this is possible. Maybe it would be better to kill the game instance and restart it from scratch? That way, we'll avoid other problems related to unloading assets. Or just remove the disconnect command cause anyone with hurry don't use it.

DaniGP17 avatar May 27 '25 19:05 DaniGP17

I'm not sure if this is possible. Maybe it would be better to kill the game instance and restart it from scratch? That way, we'll avoid other problems related to unloading assets. Or just remove the disconnect command cause anyone with hurry don't use it.

You need to think that is not only the fact that people uses "disconnect" command, if server crashes, you get dropped from the server for any reason at all, you will still need to close fivem + open it again and in this last months i've been seeing that fivem not launches always, sometimes it crashes, other times stucks at "Analyzing game data", so I think if we get fixed the "Waiting game to shutdown" issue will be nice, is not something the platform should have tbh

imsnaily avatar May 27 '25 20:05 imsnaily

You need to think that is not only the fact that people uses "disconnect" command, if server crashes, you get dropped from the server for any reason at all, you will still need to close fivem + open it again

Well so I think the best approach will be to kill the game instance, I've been looking how the shutdown state work and it hook a game function CGame::ShutdownSession to know when the game stops the session, so I can't think about a "fix" to get that function called earlier.

DaniGP17 avatar May 27 '25 20:05 DaniGP17