@@ -1173,15 +1173,18 @@ boolean isCompatibleVersion(String[] server, String[] client) {
11731173 private ExperimenterData login (SessionWrapper session , LoginCredentials cred )
11741174 throws DSOutOfServiceException {
11751175 this .login = cred ;
1176+ this .serverHost = session .client .getProperty ("omero.host" );
1177+
11761178 Connector connector = null ;
11771179 SecurityContext ctx = null ;
1180+
11781181 try {
11791182 ServiceFactoryPrx entryEncrypted = session .client .getSession ();
11801183
11811184 // version check
11821185 String clientVersion = Gateway .class .getPackage ().getImplementationVersion ();
11831186 IConfigPrx conf = entryEncrypted .getConfigService ();
1184- String serverVersion = conf .getVersion ();
1187+ this . serverVersion = conf .getVersion ();
11851188 if (StringUtils .isNotEmpty (clientVersion )
11861189 && StringUtils .isNotEmpty (serverVersion )
11871190 && cred .getCheckVersion ()) {
@@ -1236,9 +1239,7 @@ private ExperimenterData login(SessionWrapper session, LoginCredentials cred)
12361239 }
12371240 }
12381241 // Connector now controls the secureClient for closing.
1239- String host = session .client .getProperty ("omero.host" );
1240- this .serverHost = host ;
1241- cred .getServer ().setHostname (host );
1242+ cred .getServer ().setHostname (this .serverHost );
12421243 String port = session .client .getProperty ("omero.port" );
12431244 cred .getServer ().setPort (Integer .parseInt (port ));
12441245 ctx = new SecurityContext (exp .getDefaultGroup ().getId ());
0 commit comments