rdbms: small cleanups to session loss handling
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 8 Mar 2018 20:40:07 +0000 (12:40 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 8 Mar 2018 21:29:39 +0000 (13:29 -0800)
commit5e53629c3c8fd9f0fa476df583e66b69e81ffe88
tree226bc1fc026d7256ad758901b6f06e33b2b95772
parent5f018dd6a41ebba9cd8383e6be12f5ce010281e3
rdbms: small cleanups to session loss handling

Split the two callback runner calls in handleSessionLoss() into two
separate try/catch loops. Return the first exception, if any.

Also make the $recoverable check for connection loss in Database::query
slightly more readable by checking the positive rather than the negative.

Change-Id: I75935fa69e40450ac3983f0d3451ab3001650b6f
includes/libs/rdbms/database/Database.php