Skip to content

Commit

Permalink
Join authentication thread only if it was created (if not in accounti…
Browse files Browse the repository at this point in the history
…ng only mode)

This caused plugin (and OpenVPN) crash while terminating if radiusplugin is configured in accounting only mode and there are clients connected.
  • Loading branch information
ValdikSS committed Nov 22, 2015
1 parent 8133021 commit b7c8f99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radiusplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ extern "C"


//wait for the thread to exit
pthread_join(*context->getThread(),NULL);
if (context->conf.getAccountingOnly()==false)
pthread_join(*context->getThread(),NULL);
pthread_cond_destroy(context->getCondSend( ));
pthread_cond_destroy(context->getCondRecv( ));
pthread_mutex_destroy(context->getMutexSend());
Expand Down

0 comments on commit b7c8f99

Please sign in to comment.