Skip to content

Commit

Permalink
Do not reload schema on failed authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbes committed Dec 2, 2018
1 parent d62eb1a commit 42a63b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tarantool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,6 @@ PHP_METHOD(Tarantool, reconnect) {
static int __tarantool_authenticate(tarantool_connection *obj) {
TSRMLS_FETCH();

tarantool_schema_flush(obj->schema);
tarantool_tp_update(obj->tps);
int batch_count = 3;
size_t passwd_len = (obj->passwd ? strlen(obj->passwd) : 0);
Expand Down Expand Up @@ -1232,7 +1231,9 @@ static int __tarantool_authenticate(tarantool_connection *obj) {
status = FAILURE;
}
if (status != FAILURE) {
if (resp.sync == space_sync && tarantool_schema_add_spaces(
if (resp.sync == auth_sync) {
tarantool_schema_flush(obj->schema);
} else if (resp.sync == space_sync && tarantool_schema_add_spaces(
obj->schema,
resp.data,
resp.data_len) == -1) {
Expand Down

0 comments on commit 42a63b4

Please sign in to comment.