Clean up streams on free
This commit is contained in:
parent
48c4b5ade0
commit
c6f4a83051
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ int libp2p_session_context_free(struct SessionContext* context) {
|
||||||
if (context->default_stream != NULL)
|
if (context->default_stream != NULL)
|
||||||
context->default_stream->close(context);
|
context->default_stream->close(context);
|
||||||
context->default_stream = NULL;
|
context->default_stream = NULL;
|
||||||
|
context->insecure_stream = NULL;
|
||||||
|
context->secure_stream = NULL;
|
||||||
free(context);
|
free(context);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue