server: allow closing conn from server action
[nikiroo-utils.git] / src / be / nikiroo / utils / serial / server / ServerString.java
index 3185c6f450f0cda09c4b66d7b1924d917c027417..89a7b28c6042418be95348191ad79794adb826fe 100644 (file)
@@ -71,6 +71,9 @@ abstract public class ServerString extends Server {
                                        String rep = null;
                                        try {
                                                rep = onRequest(this, clientVersion, data);
+                                               if (isClosing()) {
+                                                       return;
+                                               }
                                        } catch (Exception e) {
                                                onError(e);
                                        }