|
|
|
@@ -47,7 +47,7 @@ void MACAddress::findAllAddresses (Array<MACAddress>& result) |
|
|
|
freeifaddrs (addrs);
|
|
|
|
}
|
|
|
|
|
|
|
|
close (s);
|
|
|
|
::close (s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -130,7 +130,7 @@ public: |
|
|
|
closeSocket();
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================w
|
|
|
|
//==============================================================================
|
|
|
|
bool isError() const { return socketHandle < 0; }
|
|
|
|
bool isExhausted() { return finished; }
|
|
|
|
int64 getPosition() { return position; }
|
|
|
|
@@ -253,13 +253,20 @@ private: |
|
|
|
String httpRequestCmd;
|
|
|
|
int64 chunkEnd = 0;
|
|
|
|
bool isChunked = false, readingChunk = false;
|
|
|
|
CriticalSection closeSocketLock;
|
|
|
|
|
|
|
|
void closeSocket (bool resetLevelsOfRedirection = true)
|
|
|
|
{
|
|
|
|
const ScopedLock lock (closeSocketLock);
|
|
|
|
|
|
|
|
if (socketHandle >= 0)
|
|
|
|
close (socketHandle);
|
|
|
|
{
|
|
|
|
::shutdown (socketHandle, SHUT_RDWR);
|
|
|
|
::close (socketHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
socketHandle = -1;
|
|
|
|
|
|
|
|
if (resetLevelsOfRedirection)
|
|
|
|
levelsOfRedirection = 0;
|
|
|
|
}
|
|
|
|
|