Author: rhs
Date: Tue Apr 24 16:54:58 2012
New Revision: 1329850

URL: http://svn.apache.org/viewvc?rev=1329850&view=rev
Log:
only return listeners with activity

Modified:
    qpid/proton/trunk/proton-c/src/driver.c

Modified: qpid/proton/trunk/proton-c/src/driver.c
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/driver.c?rev=1329850&r1=1329849&r2=1329850&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/driver.c (original)
+++ qpid/proton/trunk/proton-c/src/driver.c Tue Apr 24 16:54:58 2012
@@ -679,7 +679,13 @@ pn_listener_t *pn_driver_listener(pn_dri
   if (!d) return NULL;
 
   pn_listener_t *l = d->listener_next;
-  if (l) { d->listener_next = l->next; }
+  if (!l) return NULL;
+
+  if (!(l->idx && d->fds[l->idx].revents & POLLIN)) {
+    return NULL;
+  }
+
+  d->listener_next = l->next;
   return l;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to