When setting up the DTLS session, close the previous DTLS session if it exists.

Resolves: #293

Signed-off-by: Alan Jowett alanjo@microsoft.com
This commit is contained in:
Alan Jowett
2020-04-27 09:25:46 -06:00
committed by Nikos Mavrogiannopoulos
parent d2def367c3
commit 75470d99c3
2 changed files with 5 additions and 0 deletions

View File

@@ -387,6 +387,10 @@ static int setup_dtls_connection(struct worker_st *ws)
/* reset MTU */
link_mtu_set(ws, ws->adv_link_mtu);
if (ws->dtls_session != NULL) {
gnutls_deinit(ws->dtls_session);
}
ws->dtls_session = session;
return 0;