diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-08-26 20:47:53 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-08-26 20:47:53 +0000 |
commit | 6d3019034a267112877ab3223e1e537ba5022f63 (patch) | |
tree | 2ac5e69c5755721a1ba031357dd7bb5117503dd5 /pjlib/src/pj/activesock.c | |
parent | a1fbbe2cf8eef34d0b2fda5c5a3d12680dca8136 (diff) |
More ticket #601: premature connection close with TCP active socket case
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2248 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/activesock.c')
-rw-r--r-- | pjlib/src/pj/activesock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pjlib/src/pj/activesock.c b/pjlib/src/pj/activesock.c index 903de70d..2b2fc6da 100644 --- a/pjlib/src/pj/activesock.c +++ b/pjlib/src/pj/activesock.c @@ -511,7 +511,11 @@ static void ioqueue_on_read_complete(pj_ioqueue_key_t *key, &r->src_addr, &r->src_addr_len); } - if (status != PJ_EPENDING && status != PJ_ECANCELLED) { + if (status == PJ_SUCCESS) { + /* Immediate data */ + ; + } else if (status != PJ_EPENDING && status != PJ_ECANCELLED) { + /* Error */ bytes_read = -status; } else { break; |