Skip to content

Commit 5e130f8

Browse files
author
Alexandre jublot
committed
merge: hotfix/clientDestruction into dev
2 parents b8f43fb + a9b23d6 commit 5e130f8

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/src/tcp/ClientImpl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ void polymorph::network::tcp::ClientImpl::_doReceive()
131131

132132
polymorph::network::tcp::ClientImpl::~ClientImpl()
133133
{
134+
if (!_isConnected)
135+
return;
134136
polymorph::network::DisconnectionDto dto;
135137
std::promise<void> promise;
136138
auto future = promise.get_future();

src/src/udp/ClientImpl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ polymorph::network::udp::ClientImpl::ClientImpl(std::string host, std::uint16_t
4747

4848
polymorph::network::udp::ClientImpl::~ClientImpl()
4949
{
50+
if (!_isConnected)
51+
return;
5052
DisconnectionDto dto;
5153
std::promise<void> promise;
5254
auto future = promise.get_future();

0 commit comments

Comments
 (0)