jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
997 stars 222 forks source link

Client does not update window on server name change #3177

Open pljones opened 1 year ago

pljones commented 1 year ago

Describe the bug

If a server is restarted, changing the configuration to have a new server name, if it had been recording before the change, the client - still connected - does not update the recording banner.

To Reproduce

  1. Start a server named "Server A" on the command line, with recording enabled, activate recording.
  2. The red recording banner appears indicating recording is taking place at "Server A".
  3. The window title says "Server A".
  4. Restart the server with the name "Server B" on the command line.

Expected behavior

  1. The red recording banner should say "Server B".
  2. The window title should say "Server B"

Screenshots

Original server started:

Jamulus     2059       1  0 Sep20 ?        00:00:09 /opt/Jamulus/bin/Jamulus-server -n -s -p 54850 -T -F -P -u 50 -l /opt/Jamulus/log/Jamulus.log -e anygenre2.jamulus.io:22224 --serverpublicip 192.168.1.19 -R /opt/Jamulus/run/recording -o jamulus.drealm.info;London;224 -w /opt/Jamulus/systemd/welcome-server.html

-o jamulus.drealm.info;London;224 -> "jamulus.drealm.info"

Initial server connection: image Window title and recording banner on initial connection: image

Original server stopped and replaced on same port:

Jamulus     8281       1  7 18:06 ?        00:00:06 /opt/Jamulus/bin/Jamulus-original-music -n -s -p 54850 -T -F -P -u 10 -l /opt/Jamulus/log/Jamulus.log -e jamulusdirectory8.drealm.info:22824 --serverpublicip 81.174.155.168 -R /opt/Jamulus/run/recording --norecord -o Original Music;London;224 -w /opt/Jamulus/systemd/welcome-original-music.html

-o Original Music;London;224 -> "Original Music"

Connection window shows new name (and the welcome message was shown) but recording banner and window title are not updated: image

Version of Jamulus

Client: 3.10.0 Server: 3.10.0

pljones commented 1 year ago

I'm pretty sure the reason for this is the client is responsible for actively retrieving the server details when it connects. As it doesn't think a new "connection" (in Jamulus terms - udp being connectionless anyway) has been established, it doesn't make the request.

Anyone any ideas on a backwards compatible fix? (i.e. one where no change to the server would be needed.) (I'm assuming nearly all clients do get updated to latest version.)

ann0see commented 1 year ago

Can we emit something like a server Info changed message from the server?

pljones commented 1 year ago

Old servers won't do it -- that's the main problem. Many, many servers don't get updated.

ann0see commented 1 year ago

I mean the client could also request it itself, but I don't think it's worth it...

pljones commented 1 year ago

The client wouldn't know when to request it.

ann0see commented 1 year ago

Yes. And thus poll for it, which is inefficient.

pljones commented 1 year ago

Actually, this might work as client only...

The client, however, only expects and deals with some of that when it thinks it's connecting. For example, whilst it will display a server licence, I think it only pops up the "Accept" box when "connecting" and, as observed, ignores the server details.

So yes, that's something to investigate. A plan slowly emerges 😄 .

ann0see commented 1 year ago

This means that we could configure the client to also react on updates from the server side.

pljones commented 1 year ago

This means that we could configure the client to also react on updates from the server side.

Yeah, I think so.