0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00

HTTP client/server -- now that socket is a smart pointer, make sure to check it is defined before calling close() method.

This commit is contained in:
James Yonan 2015-07-22 13:08:22 -07:00 committed by Lev Stipakov
parent dfba2a6f28
commit f085fa9352
No known key found for this signature in database
GPG Key ID: 88670BE258B9C258

View File

@ -338,7 +338,8 @@ namespace openvpn {
timeout_timer.cancel();
if (link)
link->stop();
sock->close();
if (sock)
sock->close();
if (remove_self_from_map)
asio::post(io_context, [self=Ptr(this), parent=Listener::Ptr(parent)]()
{