Skip to content

Commit 22ac56e

Browse files
SteffenDEgithub-actions[bot]
authored andcommitted
Update assets
1 parent 72192e3 commit 22ac56e

6 files changed

Lines changed: 47 additions & 71 deletions

File tree

priv/static/phoenix.cjs.js

Lines changed: 14 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.cjs.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.js

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,23 +1435,15 @@ var Phoenix = (() => {
14351435
if (!this.conn) {
14361436
return callback && callback();
14371437
}
1438-
let connectClock = this.connectClock;
1439-
this.waitForBufferDone(() => {
1440-
if (connectClock !== this.connectClock) {
1441-
return;
1442-
}
1443-
if (this.conn) {
1444-
if (code) {
1445-
this.conn.close(code, reason || "");
1446-
} else {
1447-
this.conn.close();
1448-
}
1438+
const connToClose = this.conn;
1439+
this.waitForBufferDone(connToClose, () => {
1440+
if (code) {
1441+
connToClose.close(code, reason || "");
1442+
} else {
1443+
connToClose.close();
14491444
}
1450-
this.waitForSocketClosed(() => {
1451-
if (connectClock !== this.connectClock) {
1452-
return;
1453-
}
1454-
if (this.conn) {
1445+
this.waitForSocketClosed(connToClose, () => {
1446+
if (this.conn === connToClose) {
14551447
this.conn.onopen = function() {
14561448
};
14571449
this.conn.onerror = function() {
@@ -1466,22 +1458,22 @@ var Phoenix = (() => {
14661458
});
14671459
});
14681460
}
1469-
waitForBufferDone(callback, tries = 1) {
1470-
if (tries === 5 || !this.conn || !this.conn.bufferedAmount) {
1461+
waitForBufferDone(conn, callback, tries = 1) {
1462+
if (tries === 5 || !conn.bufferedAmount) {
14711463
callback();
14721464
return;
14731465
}
14741466
setTimeout(() => {
1475-
this.waitForBufferDone(callback, tries + 1);
1467+
this.waitForBufferDone(conn, callback, tries + 1);
14761468
}, 150 * tries);
14771469
}
1478-
waitForSocketClosed(callback, tries = 1) {
1479-
if (tries === 5 || !this.conn || this.conn.readyState === SOCKET_STATES.closed) {
1470+
waitForSocketClosed(conn, callback, tries = 1) {
1471+
if (tries === 5 || conn.readyState === SOCKET_STATES.closed) {
14801472
callback();
14811473
return;
14821474
}
14831475
setTimeout(() => {
1484-
this.waitForSocketClosed(callback, tries + 1);
1476+
this.waitForSocketClosed(conn, callback, tries + 1);
14851477
}, 150 * tries);
14861478
}
14871479
onConnClose(event) {

priv/static/phoenix.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.mjs

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,23 +1406,15 @@ var Socket = class {
14061406
if (!this.conn) {
14071407
return callback && callback();
14081408
}
1409-
let connectClock = this.connectClock;
1410-
this.waitForBufferDone(() => {
1411-
if (connectClock !== this.connectClock) {
1412-
return;
1413-
}
1414-
if (this.conn) {
1415-
if (code) {
1416-
this.conn.close(code, reason || "");
1417-
} else {
1418-
this.conn.close();
1419-
}
1409+
const connToClose = this.conn;
1410+
this.waitForBufferDone(connToClose, () => {
1411+
if (code) {
1412+
connToClose.close(code, reason || "");
1413+
} else {
1414+
connToClose.close();
14201415
}
1421-
this.waitForSocketClosed(() => {
1422-
if (connectClock !== this.connectClock) {
1423-
return;
1424-
}
1425-
if (this.conn) {
1416+
this.waitForSocketClosed(connToClose, () => {
1417+
if (this.conn === connToClose) {
14261418
this.conn.onopen = function() {
14271419
};
14281420
this.conn.onerror = function() {
@@ -1437,22 +1429,22 @@ var Socket = class {
14371429
});
14381430
});
14391431
}
1440-
waitForBufferDone(callback, tries = 1) {
1441-
if (tries === 5 || !this.conn || !this.conn.bufferedAmount) {
1432+
waitForBufferDone(conn, callback, tries = 1) {
1433+
if (tries === 5 || !conn.bufferedAmount) {
14421434
callback();
14431435
return;
14441436
}
14451437
setTimeout(() => {
1446-
this.waitForBufferDone(callback, tries + 1);
1438+
this.waitForBufferDone(conn, callback, tries + 1);
14471439
}, 150 * tries);
14481440
}
1449-
waitForSocketClosed(callback, tries = 1) {
1450-
if (tries === 5 || !this.conn || this.conn.readyState === SOCKET_STATES.closed) {
1441+
waitForSocketClosed(conn, callback, tries = 1) {
1442+
if (tries === 5 || conn.readyState === SOCKET_STATES.closed) {
14511443
callback();
14521444
return;
14531445
}
14541446
setTimeout(() => {
1455-
this.waitForSocketClosed(callback, tries + 1);
1447+
this.waitForSocketClosed(conn, callback, tries + 1);
14561448
}, 150 * tries);
14571449
}
14581450
onConnClose(event) {

priv/static/phoenix.mjs.map

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)