Repository navigation
Conversation
…ients-default # Conflicts: # src/Simplex/FileTransfer/Server.hs # src/Simplex/FileTransfer/Server/Env.hs # src/Simplex/FileTransfer/Transport.hs # src/Simplex/Messaging/Transport/HTTP2/Server.hs # src/Simplex/Messaging/Transport/Server.hs # tests/CLITests.hs
sh-agents
marked this pull request as ready for review
November 19, 2026 15:38
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stalled XFTP connections and connections of vanished peers are closed, and costs of each request and connection are reduced.
Connections
xftp-server initwrites[INACTIVE_CLIENTS] disconnect = on,ttl = 21600andcheck_interval = 3600, assmp-server initdoes. In existing ini files,disconnect = offis kept; the limits below are applied with expiry on or off, except where expiry is named.TCP_USER_TIMEOUTof 3 minutes. A connection is closed when neither keep-alive probes nor sent data are acknowledged by its peer for 3 minutes.fileTimeout, as receiving a chunk is; the connection is closed when the limit is reached. A connection with a queued response that is not read by the client is closed by inactive-client expiry. Reading a request body is limited byfileTimeout, also in a repeated upload of a committed chunk.TransportServerConfigfields, off by default; they are set for XFTP server sockets only, without ini settings.firstRequestTimeout(60 s by default) is a new field too, applied inrunHTTP2Server.Requests and background work
receiveEncFile).addRecipients, in both stores).limitrows.responseBuilderinstead of a streaming worker.log_statsis off, so their Prometheus counts are correct.Operations
xftp-server start --maintenance(-m), database migrations are applied, and the server is not started.simplex_xftp_sockets_*{port}.sendEncFile: XFTP server downloads and simplex-chat remote-control transfers).xftp-serveris linked with the RTS defaults-N -F1.2 -A16m -I0.01 -Iw15 -T -ki2k --disable-delayed-os-memory-return. Only the matching defaults are overridden by flags given at run time, so-ki2kand-Tare applied in existing systemd units without changes.Measurements
Builds of 46253a4 and of master 880d089 were measured with GHC 9.6.3 and
-O2. The server and the clients ran on t3.medium (2 vCPU) instances on AWS, and the servers were started with+RTS -N -T -RTSand[INACTIVE_CLIENTS] disconnect = off. "master + RTS defaults" is master started with the RTS defaults of this branch given at run time.All 300 idle connections of a client host whose packets were dropped were closed 170–185 s after the drop.
Tests
TIMEOUTis returned when a repeated upload of a committed chunk is stalled;limitrows.--maintenance, the server is not started, and migrations are applied with PostgreSQL.receiveSbFile;db_store_logrecord of added recipients;delayUntilDayTime, and its wait until the next day;closeTLSis also changed in #2059, with the same implementation; the PR merged second is updated by merging master.