In DNS lookup code, make sure the weak pointer we use lives through the expected scope (if branch)

This commit is contained in:
Benjamin Sergeant
2019-09-19 12:51:11 -07:00
parent 20ce498d23
commit 47b3368f78
9 changed files with 98 additions and 50 deletions

View File

@ -134,7 +134,7 @@ namespace ix
std::string errMsg;
struct addrinfo* res = getAddrInfo(hostname, port, errMsg);
if (self.lock())
if (auto lock = self.lock())
{
// Copy result into the member variables
setRes(res);

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "6.2.1"
#define IX_WEBSOCKET_VERSION "6.2.2"