TheGrandmother / MUD

The worlds lames mud :/
1 stars 1 forks source link

Clients get their connection terminated if they refreshed the page #34

Open Chilinot opened 8 years ago

Chilinot commented 8 years ago

If a client refreshes/updates their page their new connection gets closed when their old connections times out. A possible fix to this would be to limit clients to only have one connection per IP-address.

TheGrandmother commented 8 years ago

we have an explicit warning when the user tries to navigate away from the page.

For testing reasons it would be incredibly annoying to be limited to one connection per ip.

TheGrandmother commented 8 years ago

Sorry misread the issue.

This is a legit issue.

TheGrandmother commented 8 years ago

Doesn't #27 solve this as well. Should we really have duplicate issues ?

Chilinot commented 8 years ago

I think this is actually an issue with the websocket library we are using serverside. But it requires more testing before I can draw a conclusion.

TheGrandmother commented 8 years ago

Is there really an issue with having the old connection from the same IP terminate if the new connection has the correct browser ID.

Apropos nothing: Having Ctrl+w close a tab in the browser is a fucking pain considering it deletes a word in insert mode in Vim.

Chilinot commented 8 years ago

That is not the problem. The library closes the new connection when the old connection dies. So if you refresh your webpage and start playing suddenly the server might kill your new connection out of the blue because the old connection from before the refresh timed out or something.

Chilinot commented 8 years ago

But as I said before, I need to do more tests to see if this is actually what is happening.

TheGrandmother commented 8 years ago

Ahaa I see. But I still think fixing #27 will make this a non issue.