tls: fix session state update on accept
Only set state to ready if session is not already closing. Type: fix Change-Id: Ic95667f43ed09d693f1cf7c9f1c16f7f995ea2d8 Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
committed by
Dave Barach
parent
3150250bc9
commit
0bfce6b724
@ -501,7 +501,6 @@ tls_session_accept_callback (session_t *ts)
|
||||
ctx->c_s_index = SESSION_INVALID_INDEX;
|
||||
ctx->c_thread_index = ts->thread_index;
|
||||
ctx->tls_ctx_handle = ctx_handle;
|
||||
ts->session_state = SESSION_STATE_READY;
|
||||
ts->opaque = ctx_handle;
|
||||
ctx->tls_session_handle = session_handle (ts);
|
||||
ctx->listener_ctx_index = tls_listener->opaque;
|
||||
@ -518,6 +517,9 @@ tls_session_accept_callback (session_t *ts)
|
||||
tls_disconnect_transport (ctx);
|
||||
}
|
||||
|
||||
if (ts->session_state < SESSION_STATE_READY)
|
||||
ts->session_state = SESSION_STATE_READY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user