Skip to content

Commit

Permalink
Polishing InitFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
mirromutth committed Apr 1, 2024
1 parent ea1881b commit e97dc7d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/InitFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,19 @@ final class InitFlow {
* @param password the password of the {@code user}.
* @param compressionAlgorithms the list of compression algorithms.
* @param zstdCompressionLevel the zstd compression level.
* @return a {@link Flux} that indicates the initialization is done, or an error if the initialization failed.
* @return a {@link Mono} that indicates the initialization is done, or an error if the initialization failed.
*/
static Flux<Void> initHandshake(Client client, SslMode sslMode, String database, String user,
static Mono<Void> initHandshake(Client client, SslMode sslMode, String database, String user,
@Nullable CharSequence password, Set<CompressionAlgorithm> compressionAlgorithms, int zstdCompressionLevel) {
return client.exchange(new HandshakeExchangeable(client, sslMode, database, user, password,
compressionAlgorithms, zstdCompressionLevel));
return client.exchange(new HandshakeExchangeable(
client,
sslMode,
database,
user,
password,
compressionAlgorithms,
zstdCompressionLevel
)).then();
}

/**
Expand Down

0 comments on commit e97dc7d

Please sign in to comment.