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

edited November 2015 in JavaScript and TypeScript
SDK version:
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.

# 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.resetKeepAlive(); # add this line


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

  • 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.
  • tvald
    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.)