necouchman commented on a change in pull request #488: GUACAMOLE-919: Implement 
PostgreSQL defaultStatementTimeout and socketTimeout
URL: https://github.com/apache/guacamole-client/pull/488#discussion_r401713600
 
 

 ##########
 File path: 
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/java/org/apache/guacamole/auth/postgresql/PostgreSQLEnvironment.java
 ##########
 @@ -47,6 +47,21 @@
      */
     private static final int DEFAULT_PORT = 5432;
 
+    /**
+     * The default defaultStatementTimeout (in seconds),
+     * if POSTGRESQL_DEFAULT_STATEMENT_TIMEOUT is not specified.
+     * Default to null (no timeout)
+     * https://mybatis.org/mybatis-3/configuration.html
+     */
+    private static final String DEFAULT_DEFAULT_STATEMENT_TIMEOUT = "null";
+
+    /**
+     * The default socketTimeout (in seconds), if POSTGRESQL_SOCKET_TIMEOUT is 
not specified.
+     * Default to 0 (no timeout)
+     * https://jdbc.postgresql.org/documentation/head/connect.html
+     */
+    private static final int DEFAULT_SOCKET_TIMEOUT = 0;
+
 
 Review comment:
   Is there some reason why you've implemented one of these as a `String` and 
the other as an `int`?  I think I would stick with `int` to be consistent with 
how other timeouts are implemented.  Also, one uses `null` for no timeout, the 
other uses 0 - can we align on that, or does the underlying code note allow for 
that?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to