Skip to content

Commit 13d2653

Browse files
committed
Do not reload schema on failed authentication
closes tarantoolgh-71
1 parent bf6ef57 commit 13d2653

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tarantool.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,6 @@ PHP_METHOD(Tarantool, reconnect) {
12961296
static int __tarantool_authenticate(tarantool_connection *obj) {
12971297
TSRMLS_FETCH();
12981298

1299-
tarantool_schema_flush(obj->schema);
13001299
tarantool_tp_update(obj->tps);
13011300
int batch_count = 3;
13021301
size_t pass_len = (obj->url_parsed->pass ? strlen(obj->url_parsed->pass) : 0);
@@ -1344,7 +1343,9 @@ static int __tarantool_authenticate(tarantool_connection *obj) {
13441343
status = FAILURE;
13451344
}
13461345
if (status != FAILURE) {
1347-
if (resp.sync == space_sync && tarantool_schema_add_spaces(
1346+
if (resp.sync == auth_sync) {
1347+
tarantool_schema_flush(obj->schema);
1348+
} else if (resp.sync == space_sync && tarantool_schema_add_spaces(
13481349
obj->schema,
13491350
resp.data,
13501351
resp.data_len) == -1) {

0 commit comments

Comments
 (0)