Skip to content

Commit

Permalink
hotfix : ㅠㅠ
Browse files Browse the repository at this point in the history
  • Loading branch information
genius00hwan committed Nov 24, 2024
1 parent 1757f19 commit 6c73e2c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/icurriculum/global/config/SSHMongoConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public MongoClient mongoClient() {
String host = databaseEndpoint;
int port = databasePort;

if (isServer.equals("false")) {
log.info("isServer value: {}", isServer);
Integer forwardedPort = initializer.buildSshConnection(databaseEndpoint, databasePort);
host = "localhost";
port = forwardedPort;
}
// if (isServer.equals("false")) {
log.info("isServer value: {}", isServer);
Integer forwardedPort = initializer.buildSshConnection(databaseEndpoint, databasePort);
host = "localhost";
port = forwardedPort;
// }

try {
ConnectionString connectionString = new ConnectionString(String.format(
Expand All @@ -66,7 +66,6 @@ public MongoClient mongoClient() {

log.info("mongo connection through SSH: host={}, port={}", host, port);


return MongoClients.create(mongoClientSettings);
} catch (Exception e) {
log.error("Failed to create MongoClient: {}", e.getMessage(), e);
Expand Down

0 comments on commit 6c73e2c

Please sign in to comment.