Changeset 985d66d


Ignore:
Timestamp:
2016-09-25T02:21:59Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
1a8875f
Parents:
524e931
Message:

twitter: don't count filter stream reply as valid pongs

Twitter streams send newlines to indicate that they are alive. The
twitter_http_stream() function processes those and sets the ponged
flag so that the whole connection doesn't timeout.

That function is used to handle both user stream and filter stream.
If the user stream is dead (not sending whitespace) but the filter
stream isn't, the latter keeps the connection alive while the main
twitter channel is completely dead.

This commit only sets the ponged flag for the user stream. This has
the side effect of not detecting if the filter stream dies - but that
didn't work before, anyway. In the future the whole stream connection
management should be revamped - for example stream disconnections
shouldn't take the whole account down, especially not filter streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r524e931 r985d66d  
    10191019        }
    10201020
    1021         ic->flags |= OPT_PONGED;
    10221021        td = ic->proto_data;
    10231022
     
    10351034                imc_logout(ic, TRUE);
    10361035                return;
     1036        }
     1037
     1038        if (req == td->stream) {
     1039                ic->flags |= OPT_PONGED;
    10371040        }
    10381041
Note: See TracChangeset for help on using the changeset viewer.