extmod/modssl_mbedtls: Reference SSLContext from SSLSocket.
Prevent the GC cleaning up (and finalising) the SSLContext while the socket is still live. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
01c758e26a
commit
70c564324c
|
@ -357,6 +357,7 @@ STATIC mp_obj_t ssl_socket_make_new(mp_obj_ssl_context_t *ssl_context, mp_obj_t
|
|||
mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t);
|
||||
#endif
|
||||
o->base.type = &ssl_socket_type;
|
||||
o->ssl_context = ssl_context;
|
||||
o->sock = sock;
|
||||
o->poll_mask = 0;
|
||||
o->last_error = 0;
|
||||
|
|
Loading…
Reference in New Issue