Ver Fonte

- fixed FTP EOF

Laurent Bedubourg há 17 anos atrás
pai
commit
4395ac6e08
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      std/mtwin/net/Ftp.hx

+ 5 - 0
std/mtwin/net/Ftp.hx

@@ -383,7 +383,11 @@ class Ftp {
 			bufSize = 8192;
 		var res = voidCommand("TYPE I");
 		var cnx = transferConnection(cmd, rest);
+		var buf = neko.Lib.makeString(bufSize);
 		while (cnx != null){
+			var rdd = try cnx.input.readBytes(buf, 0, bufSize) catch(eof:Eof) break;
+			cb(buf, rdd);
+			/*
 			var rdd = 0;
 			try {
 				var buf = neko.Lib.makeString(bufSize);
@@ -395,6 +399,7 @@ class Ftp {
 			}
 			if (rdd < bufSize)
 				break;
+			*/
 		}
 		if (cnx != null)
 			cnx.close();