Skip to content

Commit a53e0e5

Browse files
committed
extmod/modussl_axtls: Use mp_stream_close() method.
1 parent c141584 commit a53e0e5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

extmod/modussl_axtls.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ STATIC mp_obj_t socket_close(mp_obj_t self_in) {
136136
mp_obj_ssl_socket_t *self = MP_OBJ_TO_PTR(self_in);
137137
ssl_free(self->ssl_sock);
138138
ssl_ctx_free(self->ssl_ctx);
139-
140-
mp_obj_t dest[2];
141-
mp_load_method(self->sock, MP_QSTR_close, dest);
142-
return mp_call_method_n_kw(0, 0, dest);
139+
return mp_stream_close(self->sock);
143140
}
144141
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_close_obj, socket_close);
145142

0 commit comments

Comments
 (0)