mirror of
https://github.com/EndPositive/slipstream.git
synced 2025-10-08 12:25:04 +00:00
Accept new connection if the old one was reset
This commit is contained in:
parent
1bd6c0d76d
commit
e7d1d46e35
1 changed files with 13 additions and 0 deletions
|
|
@ -501,6 +501,19 @@ int slipstream_client_callback(picoquic_cnx_t* cnx,
|
|||
|
||||
slipstream_client_free_stream_ctx(client_ctx, stream_ctx);
|
||||
picoquic_reset_stream(cnx, stream_id, SLIPSTREAM_FILE_CANCEL_ERROR);
|
||||
|
||||
// allow accepting next connection
|
||||
slipstream_client_accepter_args* args = malloc(sizeof(slipstream_client_accepter_args));
|
||||
args->fd = client_ctx->listen_sock;
|
||||
args->cnx = cnx;
|
||||
args->client_ctx = client_ctx;
|
||||
args->thread_ctx = client_ctx->thread_ctx;
|
||||
|
||||
pthread_t thread;
|
||||
if (pthread_create(&thread, NULL, slipstream_client_accepter, args) != 0) {
|
||||
perror("pthread_create() failed for thread");
|
||||
free(args);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case picoquic_callback_stateless_reset:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue