From 6195e8a865036c0577e6e91239703cbc0e559754 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 24 Apr 2007 15:41:08 +0000
Subject: [PATCH] Fix for issue 1448 (closing the status panel causes I/O Error in opends)

---
 opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java
index bcf8bc4..f60a851 100644
--- a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java
+++ b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java
@@ -327,10 +327,9 @@
       public Object processBackgroundTask() throws NamingException
       {
         Boolean isServerRunning = Boolean.TRUE;
+        InitialLdapContext ctx = null;
         try
         {
-          InitialLdapContext ctx = null;
-
           String ldapUrl = getLDAPURL();
 
           if (ldapUrl != null)
@@ -369,6 +368,16 @@
         {
           throw new IllegalStateException("Unexpected throwable.", t);
         }
+        if (ctx != null)
+        {
+          try
+          {
+            ctx.close();
+          }
+          catch (Throwable t)
+          {
+          }
+        }
         return isServerRunning;
       }
 

--
Gitblit v1.10.0