Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Windows to
ExternalBuild
so that builds on Windows are recognizedand used when appropriate.
Fix WsgiServer, which is used for communicating with the Unity process
on Windows, by pinning to an older version of flask/werkzeug that still
supports TCP keepalive. Some background:
AgentManager.cs
creates a singleSocket
object and communicatesthrough it for the lifetime of the application. This is different from
the default HTTP request flow, where a TCP connection is created at the
beginning of the request and destroyed at the end. For this connection
to work properly, TCP keepalive must be enabled.
Previously, setting
werkzeug.serving.WSGIRequestHandler. protocol_version = "HTTP/1.1"
(asWsgiServer
does) would activate TCPkeepalive by default. However, the flask/werkzeug built-in server relies
on the python built-in server, which had (has?) a bug in keepalive
connections: if you didn't read the request body, it wouldn't properly
empty the socket, and then the next time an HTTP request handler fired
the handler would read data from the previous request. Because the
server shipped with flask/werkzeug is not meant to be productionizable,
and several users were complaining about this issue, the devs just
disabled keepalive altogether and moved on. Removal note here:
https://werkzeug.palletsprojects.com/en/2.3.x/changes/#version-2-1-2.
More details here: pallets/werkzeug#2397.
I think
WsgiServer
was implemented with a previous version of flask/werkzeug, and it broke when the version numbers were updated.
I understand that Windows is not officially supported, but its usage is
a requirement for some, and even just enabling users to build on Windows
themselves will be very useful.
These changes do not affect the FifoServer, which is used on MacOS and
Linux.