From 6d3019034a267112877ab3223e1e537ba5022f63 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 26 Aug 2008 20:47:53 +0000 Subject: 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 --- pjlib/src/pj/activesock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3