mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-27 15:40:02 +00:00
SIGTERM also interrupts server2 during net_read()
This commit is contained in:
parent
6a2bc23f63
commit
a9d7d03e30
@ -618,7 +618,7 @@ int psk_callback( void *p_info, ssl_context *ssl,
|
||||
}
|
||||
#endif /* POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED */
|
||||
|
||||
static int listen_fd;
|
||||
static int listen_fd, client_fd = -1;
|
||||
|
||||
/* Interruption handler to ensure clean exit (for valgrind testing) */
|
||||
#if !defined(_WIN32)
|
||||
@ -628,13 +628,13 @@ void term_handler( int sig )
|
||||
((void) sig);
|
||||
received_sigterm = 1;
|
||||
net_close( listen_fd ); /* causes net_accept() to abort */
|
||||
net_close( client_fd ); /* causes net_read() to abort */
|
||||
}
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 0, len, written, frags, exchanges;
|
||||
int client_fd = -1;
|
||||
int version_suites[4][2];
|
||||
unsigned char buf[IO_BUF_LEN];
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user