Skip to content

Commit

Permalink
Better error when closing an already closed session in TLS test harness.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed Jun 5, 2020
1 parent 38bf3d5 commit d0e08a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/src/common/harnessTls.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ void hrnTlsServerRunParam(IoRead *read, const String *certificate, const String

case hrnTlsCmdClose:
{
if (serverSession == NULL)
THROW(AssertError, "TLS session is already closed");

tlsSessionClose(serverSession, true);
tlsSessionFree(serverSession);
serverSession = NULL;
Expand Down

0 comments on commit d0e08a5

Please sign in to comment.