jsonrpc: Fix Python implementation of inactivity logic.
authorBen Pfaff <blp@nicira.com>
Fri, 14 Sep 2012 20:09:33 +0000 (13:09 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 18 Sep 2012 17:23:01 +0000 (10:23 -0700)
commitab678217dd626b1bf3f17f784272438e46190834
treee6dcbacc93bb2908ea7d2900f09d7c74bb09224d
parentaf1ac4b91a1435e7280bec73bc3fd511075d093c
jsonrpc: Fix Python implementation of inactivity logic.

When a JSON-RPC session receives bytes, or when it successfully sends
queued bytes, then it should count that as activity.  However, the code
here was reversed, in that it used the wrong check in each place.  That is,
when it tried to receive data, it would check whether data had just been
sent, and when it tried to send data, it would check whether data had just
been received.  Neither one makes sense and doesn't work.

Bug #13214.
Reported-by: Luca Giraudo <lgiraudo@nicira.com>
CC: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
python/ovs/jsonrpc.py