now mostly streamified!
[nikiroo-utils.git] / src / be / nikiroo / utils / serial / server / ConnectAction.java
index c02d734f8a95ee34fc9b3e116c5f8357dbd02940..d359e08b217f623ddde1749090aeefc2391deffd 100644 (file)
@@ -376,7 +376,7 @@ abstract class ConnectAction {
                                        contentToSend = false;
                                }
 
-                               if (in.next()) {
+                               if (in.next() && !in.eof()) {
                                        // TODO: could be possible to check for non-crypt and only
                                        // do it for crypt
                                        InputStream read = new ReplaceInputStream(in.open(), //