Skip to content

Commit

Permalink
yarn build
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Dec 23, 2024
1 parent 0850912 commit c0b50e0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/turbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5442,8 +5442,8 @@ window.Turbo = Turbo$1;
addEventListener("turbo:before-fetch-request", encodeMethodIntoRequestBody);

var adapters = {
logger: self.console,
WebSocket: self.WebSocket
logger: typeof console !== "undefined" ? console : undefined,
WebSocket: typeof WebSocket !== "undefined" ? WebSocket : undefined
};

var logger = {
Expand Down Expand Up @@ -5485,12 +5485,11 @@ class ConnectionMonitor {
isRunning() {
return this.startedAt && !this.stoppedAt;
}
recordPing() {
recordMessage() {
this.pingedAt = now();
}
recordConnect() {
this.reconnectAttempts = 0;
this.recordPing();
delete this.disconnectedAt;
logger.log("ConnectionMonitor recorded connect");
}
Expand Down Expand Up @@ -5689,6 +5688,7 @@ Connection.prototype.events = {
return;
}
const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);
this.monitor.recordMessage();
switch (type) {
case message_types.welcome:
if (this.triedToReconnect()) {
Expand All @@ -5704,7 +5704,7 @@ Connection.prototype.events = {
});

case message_types.ping:
return this.monitor.recordPing();
return null;

case message_types.confirmation:
this.subscriptions.confirmSubscription(identifier);
Expand Down
Loading

0 comments on commit c0b50e0

Please sign in to comment.