Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CCBC-153 Reset internal state on lcb_connect()
This patch allows callers to use lcb_connect() multiple times to implement reconnecting using the same lcb_t instance. Problems ======== * After connection error all subsequent calls to lcb_connect() lead to segmentation violation. * Index used to iterate over list of backup node names wasn't reset * For systems which don't use lcb_wait() to execute the IO loop, the initial timer wasn't set, so that they might wait infinitely if error callback wasn't triggered. Solution ======== * Reset backup node index on lcb_connect() call * Remove connection logic from wait.c and make it generic. Change-Id: I63a0f6591e10c103d4a3b4de656623646aaa5c62 Reviewed-on: http://review.couchbase.org/23809 Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com> Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
- Loading branch information
Showing
4 changed files
with
54 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters