Changeset dd672e2 for protocols


Ignore:
Timestamp:
2012-11-11T21:52:26Z (8 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e132b60
Parents:
2fb1262
Message:

Detect and handle streaming connection loss.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r2fb1262 rdd672e2  
    732732{
    733733        struct im_connection *ic = req->data;
     734        struct twitter_data *td;
    734735        json_value *parsed;
    735736        int len = 0;
     
    738739        if (!g_slist_find(twitter_connections, ic))
    739740                return;
     741       
     742        td = ic->proto_data;
     743       
     744        if ((req->flags & HTTPC_EOF) || !req->reply_body) {
     745                td->stream = NULL;
     746                imcb_error(ic, "Stream closed (%s)", req->status_string);
     747                imc_logout(ic, TRUE);
     748                return;
     749        }
    740750       
    741751        printf( "%d bytes in stream\n", req->body_size );
Note: See TracChangeset for help on using the changeset viewer.