]> git.evergreen-ils.org Git - working/OpenSRF.git/commit
Multisession blocking repair
authorBill Erickson <berick@esilibrary.com>
Fri, 15 Mar 2013 19:56:55 +0000 (15:56 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 17 Mar 2013 18:42:34 +0000 (11:42 -0700)
commit78f15b09801f508a8db3b03cf40ab73c6d6b144d
treee5f255ef5233ca3cd0dc9f9c11e23e793c173ca5
parentc8b808c739637ec68f2d8181f73d93f880f55dd6
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 for session_reap() to make a sweep and check for changes
in requests that are now complete as a side-effect of checking for
completed requests.

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