Multisession blocking repair user/berick/multises-poll-wait-repair-repair
authorBill Erickson <berick@esilibrary.com>
Fri, 15 Mar 2013 19:56:55 +0000 (15:56 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 15 Mar 2013 19:56:55 +0000 (15:56 -0400)
commitc59a37b3692db23b986bc266f73055c917fa9a37
treef3c0ec11ffcb228b278ac0450fbc71ee5a349283
parent51dfd2c93ded26db5820201a1e43ed8e3cdb7d99
Multisession blocking repair

The new socket blocking code for multisession failed to take into
account that socket activity outside of the main block could lead to a
deadlock situation.  For example:

* Check status of request A -> not complete
* Check status of request B -> whatever
* Request A may now be complete, since checking the status of any request
  affects all requests
* Return to blocking loop because we think there is pending data, but in
  fact all data has already been pulled from the socket.

The solution is to make a sweep and check for changes in requests
without touching the socket after all of the socket-fiddling is done.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
src/perl/lib/OpenSRF/MultiSession.pm