Version 4.5.0
[nikiroo-utils.git] / src / be / nikiroo / utils / serial / server / ConnectAction.java
index dfdb53ed017da95df65d80f5b8111fc5e0fdc153..10435e299d70febcdeb83f2f10086c41d85339c3 100644 (file)
@@ -133,9 +133,11 @@ abstract class ConnectAction {
                                        }
                                } finally {
                                        out.close();
+                                       out = null;
                                }
                        } finally {
                                in.close();
+                               in = null;
                        }
                } catch (Exception e) {
                        onError(e);
@@ -173,7 +175,8 @@ abstract class ConnectAction {
        protected Object sendObject(Object data) throws IOException,
                        NoSuchFieldException, NoSuchMethodException, ClassNotFoundException {
                synchronized (lock) {
-                       String rep = sendString(new Exporter().append(data).toString(true));
+                       String rep = sendString(new Exporter().append(data).toString(true,
+                                       true));
                        if (rep != null) {
                                return new Importer().read(rep).getValue();
                        }