Skip to content

Commit e97dc7d

Browse files
committed
Polishing InitFlow
1 parent ea1881b commit e97dc7d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/InitFlow.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,19 @@ final class InitFlow {
126126
* @param password the password of the {@code user}.
127127
* @param compressionAlgorithms the list of compression algorithms.
128128
* @param zstdCompressionLevel the zstd compression level.
129-
* @return a {@link Flux} that indicates the initialization is done, or an error if the initialization failed.
129+
* @return a {@link Mono} that indicates the initialization is done, or an error if the initialization failed.
130130
*/
131-
static Flux<Void> initHandshake(Client client, SslMode sslMode, String database, String user,
131+
static Mono<Void> initHandshake(Client client, SslMode sslMode, String database, String user,
132132
@Nullable CharSequence password, Set<CompressionAlgorithm> compressionAlgorithms, int zstdCompressionLevel) {
133-
return client.exchange(new HandshakeExchangeable(client, sslMode, database, user, password,
134-
compressionAlgorithms, zstdCompressionLevel));
133+
return client.exchange(new HandshakeExchangeable(
134+
client,
135+
sslMode,
136+
database,
137+
user,
138+
password,
139+
compressionAlgorithms,
140+
zstdCompressionLevel
141+
)).then();
135142
}
136143

137144
/**

0 commit comments

Comments
 (0)