Skip to content

Commit

Permalink
Update push-uniapp.js
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Jun 17, 2023
1 parent 422fe98 commit cd838ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/push-uniapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function Push(options) {

Push.prototype.checkoutPing = function() {
var _this = this;
setTimeout(function () {
_this.checkoutPingTimer && clearTimeout(_this.checkoutPingTimer);
_this.checkoutPingTimer = setTimeout(function () {
_this.checkoutPingTimer = 0;
if (_this.connection.state === 'connected') {
_this.connection.send('{"event":"pusher:ping","data":{}}');
if (_this.pingTimeoutTimer) {
Expand Down

0 comments on commit cd838ea

Please sign in to comment.