Guest Username Change better websocket support

This commit is contained in:
Jeremy Zhang
2017-08-25 07:45:59 +00:00
parent e3f57500ff
commit ac956106e9
2 changed files with 9 additions and 2 deletions

View File

@ -877,7 +877,11 @@
var usr = change_unauthenticated_username($(this).val());
usr.done(function(data) {
Materialize.toast('Username changed successfully!', 10000);
run_fetch_routine();
if (socket) {
run_fetch_routine();
socket.disconnect();
initiate_websockets();
}
});
usr.fail(function(data) {
if (data.status == 429) {