Skip to content

Commit 68c3caa

Browse files
committed
Making sure the callback is set before calling it.
1 parent 8db7bf7 commit 68c3caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boost/network/protocol/http/client/connection/async_normal.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ namespace boost { namespace network { namespace http { namespace impl {
172172
} else {
173173
set_errors(ec ? ec : boost::asio::error::host_not_found);
174174
boost::iterator_range<const char*> range;
175-
callback(range,ec);
175+
if (callback) callback(range,ec);
176176
}
177177
}
178178
}

0 commit comments

Comments
 (0)