mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-19 00:46:03 +01:00
FTPClientSession::close() error? #1880
This commit is contained in:
parent
1a18621ff8
commit
57bc179db5
@ -181,20 +181,24 @@ void FTPClientSession::logout()
|
||||
{
|
||||
try { endTransfer(); }
|
||||
catch (...) { }
|
||||
_isLoggedIn = false;
|
||||
std::string response;
|
||||
sendCommand("QUIT", response);
|
||||
_isLoggedIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FTPClientSession::close()
|
||||
{
|
||||
logout();
|
||||
_pControlSocket->close();
|
||||
delete _pControlSocket;
|
||||
_pControlSocket = 0;
|
||||
try { logout(); }
|
||||
catch (...) {}
|
||||
_serverReady = false;
|
||||
if (_pControlSocket)
|
||||
{
|
||||
_pControlSocket->close();
|
||||
delete _pControlSocket;
|
||||
_pControlSocket = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ int WebSocketImpl::receiveNBytes(void* buffer, int bytes)
|
||||
|
||||
int WebSocketImpl::receiveSomeBytes(char* buffer, int bytes)
|
||||
{
|
||||
int n = _buffer.size() - _bufferOffset;
|
||||
int n = static_cast<int>(_buffer.size() - _bufferOffset);
|
||||
if (n > 0)
|
||||
{
|
||||
if (bytes < n) n = bytes;
|
||||
|
@ -55,7 +55,7 @@ namespace
|
||||
int n;
|
||||
do
|
||||
{
|
||||
n = ws.receiveFrame(buffer.begin(), buffer.size(), flags);
|
||||
n = ws.receiveFrame(buffer.begin(), static_cast<int>(buffer.size()), flags);
|
||||
ws.sendFrame(buffer.begin(), n, flags);
|
||||
}
|
||||
while (n > 0 || (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user