File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,12 +392,8 @@ class TLSSocketStream : public ForwardSocketStream {
392392
393393#endif
394394
395- struct BIOMethodDeleter {
396- void operator ()(BIO_METHOD * ptr) { BIO_meth_free (ptr); }
397- };
398-
399395 static BIO_METHOD * BIO_s_sockstream () {
400- static std::unique_ptr< BIO_METHOD , BIOMethodDeleter> meth ( [] {
396+ static BIO_METHOD * const meth = [] {
401397 auto m = BIO_meth_new (BIO_TYPE_SOURCE_SINK , " BIO_PHOTON_SOCKSTREAM" );
402398 BIO_meth_set_write (m, &TLSSocketStream::ssbio_bwrite);
403399 BIO_meth_set_read (m, &TLSSocketStream::ssbio_bread);
@@ -406,8 +402,8 @@ class TLSSocketStream : public ForwardSocketStream {
406402 BIO_meth_set_create (m, &TLSSocketStream::ssbio_create);
407403 BIO_meth_set_destroy (m, &TLSSocketStream::ssbio_destroy);
408404 return m;
409- }()) ;
410- return meth. get () ;
405+ }();
406+ return meth;
411407 }
412408
413409 static ISocketStream* get_bio_sockstream (BIO * b) {
You can’t perform that action at this time.
0 commit comments