diff options
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | 7 | ||||
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.h | 18 |
2 files changed, 16 insertions, 9 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp index 4a0cd67..04d5d86 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp @@ -16,13 +16,13 @@ #include <boost/numeric/conversion/cast.hpp> #include <Swiften/Base/Algorithm.h> -#include <Swiften/Base/SafeByteArray.h> +#include <Swiften/Base/ByteArray.h> #include <Swiften/Base/Concat.h> #include <Swiften/Base/Log.h> -#include <Swiften/StringCodecs/Hexify.h> +#include <Swiften/Base/SafeByteArray.h> #include <Swiften/FileTransfer/BytestreamException.h> #include <Swiften/Network/TimerFactory.h> -#include <Swiften/Base/ByteArray.h> +#include <Swiften/StringCodecs/Hexify.h> namespace Swift { @@ -42,6 +42,7 @@ SOCKS5BytestreamClientSession::SOCKS5BytestreamClientSession( } SOCKS5BytestreamClientSession::~SOCKS5BytestreamClientSession() { + weFailedTimeout->stop(); } void SOCKS5BytestreamClientSession::start() { diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h index cf731c1..1c0563a 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h @@ -4,16 +4,22 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2015 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once -#include <boost/shared_ptr.hpp> #include <boost/optional.hpp> +#include <boost/shared_ptr.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/ByteArray.h> #include <Swiften/FileTransfer/FileTransferError.h> -#include <Swiften/FileTransfer/WriteBytestream.h> #include <Swiften/FileTransfer/ReadBytestream.h> +#include <Swiften/FileTransfer/WriteBytestream.h> #include <Swiften/JID/JID.h> #include <Swiften/Network/Connection.h> #include <Swiften/Network/HostAddressPort.h> @@ -96,10 +102,10 @@ private: Timer::ref weFailedTimeout; - boost::bsignals::connection connectFinishedConnection; - boost::bsignals::connection dataWrittenConnection; - boost::bsignals::connection dataReadConnection; - boost::bsignals::connection disconnectedConnection; + boost::bsignals::scoped_connection connectFinishedConnection; + boost::bsignals::scoped_connection dataWrittenConnection; + boost::bsignals::scoped_connection dataReadConnection; + boost::bsignals::scoped_connection disconnectedConnection; }; } |