Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6671653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:24:51+00:00 2026-05-26T03:24:51+00:00

Im using my GAE application on my phone. I face a problem in getting

  • 0

Im using my GAE application on my phone. I face a problem in getting the disconnect notification to /_ah/channel/disconnected in channels api even if i manually close the socket by socket.close() function. the post occurs after a delay of say one minute. Does anyone know the way to speed things up? In my case socket.close() doesnt produce the channel disconnect notification(only in phone though.. it works perfectly from a laptop)!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:24:51+00:00Added an answer on May 26, 2026 at 3:24 am

    The amount of time it takes the Channel API front-end servers to “realize” that a channel is disconnected is contingent on browser implementation.

    On well-behaved browsers, we catch the beforeunload event and post a message to our front-end that says, “this client is going away.” On other browsers, we may not get the event (or we may not be able to listen to it for various implementation reasons, like the browser sends it too often (FFFUUUU IE)) or once we get the event the XHR we send may get swallowed. In those cases, the frontend server realizes the client is gone because it fails to receive a heartbeat — this is what’s happening on your phone. (out of curiousity, what phone?)

    Your case is interesting because you’re explicitly calling onclose. The only thing this does is dispose the iframe that has the Channel FE code — in other words, onclose just behaves as if the whole browser window was closed; it doesn’t take advantage of the fact that the browser is still in a good state and could wait to close until a message is sent.

    So I recommend two things: add a custom handler to your code (that does the same thing as your /_ah/disconnect handler) so you can just make an XHR when you know you’re manually closing the channel. This is kludgy but functional. The bummer about this is you’ll need to explicitly know your client id in your javascript code.

    Second, add an issue to our issue tracker (http://code.google.com/p/googleappengine/issues/list) to request better disconnect notification when onclose is called explicitly.

    Hope that helps; sorry there’s not an easy answer right now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop a GAE application using python, but I fear that Google
I am using Twitter4J API on GAE/J. I want to use the request token
I have made my GAE application using the development server, but now when I
I have been working on an application using GAE in eclipse and I have
I am using GAE Java for a multi-user application. There are multiple users with
Newbie question... I am using silverlight to POST data to my GAE application class
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
I'm interested in porting an existing application which was written using Spring/Struts2/Hibernate to GAE.
I deployed my web application on GAE using eclipse plugin. UI is fine but
If I develop my web application on GAE using Java, in future would I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.