Skip to content

Commit 42a63b4

Browse files
committed
Do not reload schema on failed authentication
closes gh-71
1 parent d62eb1a commit 42a63b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/tarantool.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,6 @@ PHP_METHOD(Tarantool, reconnect) {
11841184
static int __tarantool_authenticate(tarantool_connection *obj) {
11851185
TSRMLS_FETCH();
11861186

1187-
tarantool_schema_flush(obj->schema);
11881187
tarantool_tp_update(obj->tps);
11891188
int batch_count = 3;
11901189
size_t passwd_len = (obj->passwd ? strlen(obj->passwd) : 0);
@@ -1232,7 +1231,9 @@ static int __tarantool_authenticate(tarantool_connection *obj) {
12321231
status = FAILURE;
12331232
}
12341233
if (status != FAILURE) {
1235-
if (resp.sync == space_sync && tarantool_schema_add_spaces(
1234+
if (resp.sync == auth_sync) {
1235+
tarantool_schema_flush(obj->schema);
1236+
} else if (resp.sync == space_sync && tarantool_schema_add_spaces(
12361237
obj->schema,
12371238
resp.data,
12381239
resp.data_len) == -1) {

0 commit comments

Comments
 (0)