ID:2908423
 
Resolved
The client could send some messages while still negotiating the connection, which resulted in the connection failing.
BYOND Version:515.1626
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 115.0
Applies to:Dream Seeker
Status: Resolved (515.1627)

This issue has been resolved.
Descriptive Problem Summary:
I feel like this already has a bug report but i can't find it.

if the client sends any topic (at least topic from a window.location= javascript call, which is what i was testing) while the connection is being negotiated or renegotiated after a world.reboot(), the server will close the connection because the client sends it even if the ready to play state is unnegotiated.

This happening during a world/reboot is slightly understandable, the client could be sending the packets before it gets the world rebooting signal, but I confirmed the client also sends it when reconnecting from a failed connection. a state in which the client should understand doesn't allow for the sending topic protocol commands.

Numbered Steps to Reproduce Problem:
host test project in DD.
join server in DS.
javascript will automatically start in a window sending topic commands via window.location 10 times a second.

Reconnect via options and messages window
-OR-
reboot the world via world -> reboot.
Code Snippet (if applicable) to Reproduce Problem:
/client/New()
..()
var/html = @{" <html> <head></head> <script> function readyplayerone() { setInterval(function() { window.location = "byond://?action=test"; }, 100); /*lower this if bug does not appear*/ } readyplayerone(); </script> </html> "}
src << browse(html, "window=new")

/client/Topic(href, href_list[], hsrc)
world.log << "topic: [href]"


Expected Results:
Topics calls triggered by link clicks or world.location= calls during initial connection are ignored and not sent to the server.

Topic calls that come in while the server is soft rebooting the world are ignored by the server and not treated as a protocol error that closes the connection.
Actual Results:
Reconnecting...
Connection failed.
Reconnecting in 10 seconds...
Connecting to byond://127.0.0.1:5336...connected
Connection failed.

The problem occurs:
Every time
In other games including a test project
In other user accounts including guest
On other computers

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
It happens in 513, didn't go further.
Workarounds:

Send a signal via output() javascript calls on world/reboot to every window telling them not to send topic calls and enforcing this via what ever makes sense for your ui framework.
Lummox JR resolved issue with message:
The client could send some messages while still negotiating the connection, which resulted in the connection failing.