Fixed bug where connection errors caused 100% cpu.
parent
7cbebef352
commit
4eee66d16a
File diff suppressed because it is too large
Load Diff
|
@ -76,12 +76,12 @@
|
||||||
int totalRead = 0;
|
int totalRead = 0;
|
||||||
|
|
||||||
while (totalRead < amount) {
|
while (totalRead < amount) {
|
||||||
int status = _get->run();
|
int result = _get->run();
|
||||||
int amountRead = _get->get_bytes((char *)((uint8_t *)buffer) + totalRead, amount - totalRead);
|
int amountRead = _get->get_bytes((char *)((uint8_t *)buffer) + totalRead, amount - totalRead);
|
||||||
|
|
||||||
totalRead += amountRead;
|
if (result != 0 && 0 == amountRead) break;
|
||||||
|
|
||||||
if (status && 0 == amountRead) break;
|
totalRead += amountRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
_byteCount += totalRead;
|
_byteCount += totalRead;
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */;
|
containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */;
|
||||||
proxyType = 2;
|
proxyType = 2;
|
||||||
remoteGlobalIDString = 8DC2EF5B0486A6940098B216 /* JNetLib.framework */;
|
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
|
||||||
remoteInfo = JNetLib;
|
remoteInfo = JNetLib;
|
||||||
};
|
};
|
||||||
17F6C6800F5F9FFE000D9DA9 /* PBXContainerItemProxy */ = {
|
17F6C6800F5F9FFE000D9DA9 /* PBXContainerItemProxy */ = {
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */;
|
containerPortal = 17F6C6400F5F9E3F000D9DA9 /* JNetLib.xcodeproj */;
|
||||||
proxyType = 1;
|
proxyType = 1;
|
||||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216 /* JNetLib */;
|
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||||
remoteInfo = JNetLib;
|
remoteInfo = JNetLib;
|
||||||
};
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
Loading…
Reference in New Issue