haxball / haxball-issues

115 stars 43 forks source link

[VPS] room.onRoomLink executes more than once #1233

Closed DavidVainer closed 3 years ago

DavidVainer commented 3 years ago

Hello :) I bought an Ubuntu Linux VPS (ubuntu 18.04 xrdp, which is GUI) in order to have my bot 24/7 open. I downloaded Google Chrome, and open it with cmd command google-chrome --disable-features=WebRtcHideLocalIpsWithMdns. After it opens the browser I paste the code at haxball.com/headless, and a URL is initialized. I added some console.log()s to room.onRoomLink function to debug something, and I've noticed that it executed itself a few times during some hours the room has open! (all code in onRoomLink ran again). Does anyone knows why it happends? How can I solve this?

Thanks a lot! :)

@basro

basro commented 3 years ago

onRoomLink can trigger multiple times, that is normal behaviour.

You can ignore it after the first call.

DavidVainer commented 3 years ago

onRoomLink can trigger multiple times, that is normal behaviour.

You can ignore it after the first call.

Thanks for your fast reply :)! When it happens, can it cause things like kicking all connected players / etc?

@basro

basro commented 3 years ago

If your server lost it's internet connection that would kick all connected players AND when the connection returns you'll probably get a new room link event.

So no, it doesn't cause kicking of players, it's the other way around.

DavidVainer commented 3 years ago

If your server lost it's internet connection that would kick all connected players AND when the connection returns you'll probably get a new room link event.

So no, it doesn't cause kicking of players, it's the other way around.

I see. thanks!