Skip to content

Commit

Permalink
Fix OpenSSL hammer_test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Feb 14, 2021
1 parent e8990f6 commit be4a19f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crypto/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ struct us_internal_ssl_socket_t *ssl_on_data(struct us_internal_ssl_socket_t *s,
break;
}

context = (struct us_internal_ssl_socket_context_t *) us_socket_context(0, &s->s);

s = context->on_data(s, loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING, read);
if (us_socket_is_closed(0, &s->s)) {
return s;
Expand All @@ -277,6 +279,8 @@ struct us_internal_ssl_socket_t *ssl_on_data(struct us_internal_ssl_socket_t *s,
// at this point we might be full and need to emit the data to application and start over
if (read == LIBUS_RECV_BUFFER_LENGTH) {

context = (struct us_internal_ssl_socket_context_t *) us_socket_context(0, &s->s);

// emit data and restart
s = context->on_data(s, loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING, read);
if (us_socket_is_closed(0, &s->s)) {
Expand Down

0 comments on commit be4a19f

Please sign in to comment.