Skip to content

Upgrade uWebSockets to v20.76.0#771

Merged
jviotti merged 1 commit intomainfrom
uwebsockets-20-76-0
Mar 23, 2026
Merged

Upgrade uWebSockets to v20.76.0#771
jviotti merged 1 commit intomainfrom
uwebsockets-20-76-0

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Mar 23, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

@augmentcode
Copy link

augmentcode bot commented Mar 23, 2026

🤖 Augment PR Summary

Summary: Upgrades the vendored uWebSockets/uSockets dependency from v20.75.0 to v20.76.0.

Key Changes:

  • Bumps the uWebSockets version in DEPENDENCIES and refreshes the vendored sources under vendor/uwebsockets.
  • Adds optional userspace caching for remote addresses and introduces new helpers for retrieving remote/proxied remote ports.
  • Updates HTTP body streaming callbacks to pass maxRemainingBodyLength (adds onDataV2 while keeping the legacy onData wrapper).
  • Pulls in uSockets fixes (UDP packet buffer addressing, ASIO wakeup posting, and making LIBUS_RECV_BUFFER_LENGTH overridable).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

std::swap(this->topicTree, other.topicTree);
std::swap(this->webSocketContextDeleters, other.webSocketContextDeleters);
std::swap(this->webSocketContexts, other.webSocketContexts);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TemplatedApp::operator=(TemplatedApp&&) returns TemplatedApp& but currently has no return statement, which is undefined behavior (and may fail builds under warnings-as-errors). Consider ensuring it returns a valid reference to the assigned object.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

/* Returns the remote port number or -1 on failure */
unsigned int getRemotePort() {
int port = us_socket_remote_port(SSL, (us_socket_t *) this);
return (unsigned int) port;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getRemotePort() documents “-1 on failure” but returns unsigned int and casts the int result, so a failure would become a large positive value. Consider aligning the return type/contract so callers can reliably detect failure.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


if ((family & 0xf0) >> 4 == 1) {
/* Family 1 is INET4 */
return addr.ipv4_addr.src_port;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProxyParser::getSourcePort() returns the raw src_port value, but PROXY v2 ports are stored in network byte order, so callers may observe byte-swapped ports on little-endian hosts. This also impacts HttpResponse::getProxiedRemotePort().

Severity: medium

Other Locations
  • vendor/uwebsockets/src/ProxyParser.h:106
  • vendor/uwebsockets/src/HttpResponse.h:236

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (community)

Details
Benchmark suite Current: 1811c6a Previous: 0a8a48c Ratio
Add one schema (0 existing) 23 ms 24 ms 0.96
Add one schema (100 existing) 24 ms 30 ms 0.80
Add one schema (1000 existing) 76 ms 75 ms 1.01
Add one schema (10000 existing) 694 ms 624 ms 1.11
Update one schema (1 existing) 18 ms 20 ms 0.90
Update one schema (101 existing) 24 ms 25 ms 0.96
Update one schema (1001 existing) 78 ms 78 ms 1
Update one schema (10001 existing) 636 ms 645 ms 0.99
Cached rebuild (1 existing) 11 ms 12 ms 0.92
Cached rebuild (101 existing) 12 ms 12 ms 1
Cached rebuild (1001 existing) 28 ms 27 ms 1.04
Cached rebuild (10001 existing) 199 ms 202 ms 0.99
Index 100 schemas 116 ms 131 ms 0.89
Index 1000 schemas 992 ms 972 ms 1.02
Index 10000 schemas 14904 ms 14132 ms 1.05

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (enterprise)

Details
Benchmark suite Current: 1811c6a Previous: 0a8a48c Ratio
Add one schema (0 existing) 24 ms 21 ms 1.14
Add one schema (100 existing) 28 ms 21 ms 1.33
Add one schema (1000 existing) 74 ms 57 ms 1.30
Add one schema (10000 existing) 699 ms 462 ms 1.51
Update one schema (1 existing) 23 ms 18 ms 1.28
Update one schema (101 existing) 28 ms 21 ms 1.33
Update one schema (1001 existing) 78 ms 61 ms 1.28
Update one schema (10001 existing) 703 ms 472 ms 1.49
Cached rebuild (1 existing) 12 ms 10 ms 1.20
Cached rebuild (101 existing) 14 ms 10 ms 1.40
Cached rebuild (1001 existing) 29 ms 21 ms 1.38
Cached rebuild (10001 existing) 238 ms 131 ms 1.82
Index 100 schemas 126 ms 86 ms 1.47
Index 1000 schemas 1349 ms 798 ms 1.69
Index 10000 schemas 17775 ms 11305 ms 1.57

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti jviotti merged commit 3d8fcfa into main Mar 23, 2026
6 checks passed
@jviotti jviotti deleted the uwebsockets-20-76-0 branch March 23, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant