Browse Source

Don't start ident server if previously failed

Change-Id: I1c222daecda5d2209f33906bfa1196f74ae72906
Reviewed-on: http://gerrit.dmdirc.com/2264
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Greg Holmes 12 years ago
parent
commit
9e05653098
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/com/dmdirc/addons/identd/IdentdServer.java

+ 7
- 1
src/com/dmdirc/addons/identd/IdentdServer.java View File

@@ -49,6 +49,9 @@ public final class IdentdServer implements Runnable {
49 49
     /** The plugin that owns us. */
50 50
     private final IdentdPlugin myPlugin;
51 51
 
52
+    /** Have we failed to start this server previously? */
53
+    private boolean failed = false;
54
+
52 55
     /**
53 56
      * Create the IdentdServer.
54 57
      */
@@ -116,7 +119,7 @@ public final class IdentdServer implements Runnable {
116 119
      * Start the ident server
117 120
      */
118 121
     public void startServer() {
119
-        if (myThread == null) {
122
+        if (!failed && myThread == null) {
120 123
             try {
121 124
                 final int identPort = myPlugin.getConfig().getOptionInt(
122 125
                         myPlugin.getDomain(), "advanced.port");
@@ -125,6 +128,9 @@ public final class IdentdServer implements Runnable {
125 128
                 myThread.start();
126 129
             } catch (IOException e) {
127 130
                 Logger.userError(ErrorLevel.HIGH, "Unable to start identd server: " + e.getMessage());
131
+                if (e.getMessage().equals("Permission denied")) {
132
+                    failed = true;
133
+                }
128 134
             }
129 135
         }
130 136
     }

Loading…
Cancel
Save