bug: keep-alive timer only starts if an operation request is sent

tvaldtvald
edited November 2015 in JavaScript
SDK version: 4.0.0.2
description:
If a client app does not explicitly send an operation request after connecting to the server, the keep-alive timer does not start. Consequently, the client will be disconnected from the server after the timeout expires.

fix:
# from photon.js:444
PhotonPeer.prototype._onConnect = function () {
this._logger.debug('PhotonPeer[_onConnect] - Connected successfully! Raising "connect" event ...');
this._isConnecting = false;
this._isConnected = true;
this._dispatchPeerStatus(PhotonPeer.StatusCodes.connect);
this.resetKeepAlive(); # add this line
};

Comments

  • Thanks for report and solution.
    It will be in next release.
    Sorry that it took too much time to response.

    Vadim
  • Just curious, what is the scenario where peer does not send anything for a few seconds after connection? At least in standard Photon cloud workflow I could not reproduce this.
  • tvaldtvald
    edited February 2016
    We have a dashboard client for debugging that normally just listens to message traffic and only injects operations upon user input. (So this is definitely not a normal Photon workflow.)
Sign In or Register to comment.