Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] http2 and http have difference behavior when request timeout of atmosphere (comet) request

I just want to confirm before take time to investigate far.

in idempiere, we implement serverPush by use atmosphere 
client will do a ajax call with timeout = 2 minute

ajaxOptions: {
        url: zk.ajaxURI("/comet", {au: true}),
        type: "GET",
        cache: false,
        async: true,
        global: false,
        data: null,
        dataType: "text" ,
        this.timeout = 120000; //2 minute
    },
$.ajax(this.ajaxOptions);

in jetty 9.3.8, i set idleTimeout for ssl and non ssl = 30000 (default value)

with http connect, it just do well, when idleTimeout expired (at 30000ms), comet request just ignore it, keep connect  until expired at 2 minute

by debug i see code of method AbstractEndPoint.onIdleExpired
run branch "LOG.debug("Ignored idle endpoint {}",this);"

with https (i use http2 protocol) when idleTimeout expired, jetty just disconnect comet connect.

by debug i see code of method HTTP2Stream.onIdleExpired will always close connect when timeout.

i want http2 behavior like http. maybe i have to do something at atmosphere side,
or it's something wrong with jetty.

i hope someone can help me figure out it soon, before i have to take time investigate more.

-- 
Lê Quý Hiệp
Email: hieplq@xxxxxxxxxxxx
Skype: admin.hasuvimex

Company: Thanh Hoa Fishery Import - Export J.s.c  (HasuvimexDL 47
Add: Lot E, Le Mon Industrial Zone, Thanh Hoa, Vietnam

Back to the top