Resolve #1232, improve native HTTPRequest support
This commit is contained in:
@@ -96,7 +96,7 @@ namespace lime {
|
||||
|
||||
void Bytes::Resize (int size) {
|
||||
|
||||
if (size != length) {
|
||||
if (size != length || (length > 0 && !b)) {
|
||||
|
||||
if (size <= 0) {
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
// TODO: Should this be freed on the destructor instead? Solution for HashLink?
|
||||
free (b);
|
||||
b = NULL;
|
||||
|
||||
|
||||
@@ -435,6 +435,13 @@ class NativeHTTPRequest {
|
||||
var message = multi.infoRead ();
|
||||
var curl, instance, status;
|
||||
|
||||
if (message == null && multi.runningHandles == 0) {
|
||||
|
||||
multiTimer.stop ();
|
||||
multiTimer = null;
|
||||
|
||||
}
|
||||
|
||||
while (message != null) {
|
||||
|
||||
curl = message.curl;
|
||||
@@ -492,13 +499,6 @@ class NativeHTTPRequest {
|
||||
|
||||
}
|
||||
|
||||
if (multi.runningHandles == 0) {
|
||||
|
||||
multiTimer.stop ();
|
||||
multiTimer = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user