Results 1 to 2 of 2

Thread: Ext.data.JsonP timeout. Function abort() does not stop the request to the server

  1. #1

    Default Ext.data.JsonP timeout. Function abort() does not stop the request to the server

    hello.

    make a request to the server.
    Request jsonP falls off the timeout.
    but see the query console still hanging to the server.
    call abort (), but there is no response.

    after some time, the server responds, but the client respectively
    I get an error: TypeError: Ext.data.JsonP.callback1 is not a funtstion

    how to stop an inquiry? or how to catch the error?
    Purpose: To have only one request to the server.
    At the first timeout if

    Code:
      Send: function () {    
        this.keepalive = Ext.data.JsonP.request( { url: this.url,
                                  scope: this,
                                  timeout: this.timeout,                          
                                  success: function (jsonData) { this.EventSuccess(jsonData); },
                                  failure: function(jsonData) { this.EventFailure(jsonData); }
                                } );  
        },
    
    EventFailure: function(jsonData) {
        if (jsonData == 'timeout') {
           Ext.data.JsonP.abort(this.keepalive);
          } else
              
        if (jsonData == 'abort') {     
          this.Send();
          } else
     
        this.Send();
        },
    if you call the Est.data.JsonP.abort (this.keepalive) that triggered the event "failure", in which the "abort".
    if Ext.data.JsonP.abort (), the events of "failure" is not happening.

    request to the server is not stopped, the error occurs in both cases

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I'm having a little trouble understanding here. Are you saying that EventFailure never fires?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •