I am writing a C++ network proxy program and I use Boost.Asio. One interesting thing I found is that the program crashes when I use SSL Context. The wrong code snippet looks like this.
This is wrong because the order of members in the initializer list does not matter. Their declaration position in the code matters. The correct way should be.
ctx is initialized first and
out_socket can be initialized with an already initialized