Added mbedtls_net_close and use it in ssl_fork_server to correctly
disassociate the client socket from the parent process and the server socket from the child process.
This commit is contained in:
parent
beec142010
commit
df8e511381
3 changed files with 22 additions and 1 deletions
|
@ -651,6 +651,19 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len )
|
|||
return( ret );
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the connection
|
||||
*/
|
||||
void mbedtls_net_close( mbedtls_net_context *ctx )
|
||||
{
|
||||
if( ctx->fd == -1 )
|
||||
return;
|
||||
|
||||
close( ctx->fd );
|
||||
|
||||
ctx->fd = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gracefully close the connection
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue