Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/libguac/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ guac_user* guac_user_alloc() {
user->processing_lag = 0;
user->active = 1;

/* Allocate stream pool */
user->__stream_pool = guac_pool_alloc(0);
/* Allocate stream pool. Use GUAC_USER_MAX_STREAMS as min_size to prefer
* new indices over reused ones up to the maximum, avoiding race conditions
* where acknowledgements for closed streams could be misdelivered to
* newly-allocated streams that reused the same index. */
user->__stream_pool = guac_pool_alloc(GUAC_USER_MAX_STREAMS);

/* Initialize streams */
user->__input_streams = guac_mem_alloc(sizeof(guac_stream), GUAC_USER_MAX_STREAMS);
Expand Down