LP1874510 libopensrf recv timeout cal repair user/dyrcona/lp1874510-gateway-timeout-signoff
authorBill Erickson <berickxx@gmail.com>
Thu, 23 Apr 2020 19:32:50 +0000 (15:32 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 28 Apr 2020 14:35:50 +0000 (10:35 -0400)
commit7277a74a52356f9cd8e26f35455c0a8d15412c3c
tree1db6bbd0e634a7b21cfe390f17d1d78382badd3d
parent3fb939657f350774f6b4216c9d416eff1745a1b3
LP1874510 libopensrf recv timeout cal repair

Fixes the message receive timeout calculation logic in OpenSRF C client
code.  The calculation is performed when multiple calls to receive are
needed to piece together a response message.

The logic previously calculated the time remaining as the time remaining
minus the total time taken for all iterations with each loop iteration,
leading to exhausting the timeout too quickly.  Now it calculates the
value as time remaining minus the time taken for the only most recent
loop iteration.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Stephenson <jason@sigio.com>
src/libopensrf/osrf_app_session.c