Fix crash after failed authentication

This commit is contained in:
Brendan Shanks 2018-06-27 23:11:49 -07:00
parent 152f7a8d10
commit bf9958a273
1 changed files with 5 additions and 2 deletions

View File

@ -2190,10 +2190,13 @@ void ssh_protocol_write(struct WindRec*w, unsigned char*databuf, short datalen)
void ssh_protocol_close(WindRec*w)
{
syslog( 0, "### ssh_protocol_close\n" );
if (w->sshdata.thread) {
lshcontext *context = (lshcontext *)w->sshdata.context;
if (context) {
context->_gConsoleInEOF = true;
pthread_kill( w->sshdata.thread, SIGINT );
}
w->sshdata.thread = NULL;
ssh2_sched();
}