The libcurl networking path now bounds every request and can cancel one in flight:
- 30 s to connect, name resolution included (threaded resolver);
- 300 s for an API request (check, upload URL, apply, status);
- payload transfers bounded on progress (below 1024 B/s for 60 s aborts) with a 3600 s backstop;
sqlite3_interrupt() aborts a call in flight, which then fails with SQLITE_INTERRUPT;
- all of it tunable at runtime through the
network_* keys of cloudsync_set.
The Apple-native path (src/network/network.m, used when NATIVE_NETWORK=ON, which Mac Catalyst builds force) has none of this. It creates its requests without setting any timeout, so it runs on the NSURLSession defaults: 60 s of inactivity per request and 7 days per resource. There is also no cancellation, so a stalled transfer holds the database connection until the system gives up.
What it needs
- Map the two policies onto
NSURLSessionConfiguration / NSMutableURLRequest: timeoutIntervalForRequest and timeoutIntervalForResource, with the same split between API calls and payload transfers. NSURLSession has no direct equivalent of a low-speed limit; the progress of a transfer can be watched through the delegate, or the resource timeout used as an approximation.
- Honour the same
cloudsync_set keys, so behaviour does not depend on which transport a build uses.
- Cancel the task when
sqlite3_is_interrupted() reports the connection was interrupted, and report SQLITE_INTERRUPT like the libcurl path.
The unit tests for this live in test/network_unit.c and are built against libcurl, so the native path needs its own coverage or a manual check on a Mac Catalyst build.
The libcurl networking path now bounds every request and can cancel one in flight:
sqlite3_interrupt()aborts a call in flight, which then fails withSQLITE_INTERRUPT;network_*keys ofcloudsync_set.The Apple-native path (
src/network/network.m, used whenNATIVE_NETWORK=ON, which Mac Catalyst builds force) has none of this. It creates its requests without setting any timeout, so it runs on the NSURLSession defaults: 60 s of inactivity per request and 7 days per resource. There is also no cancellation, so a stalled transfer holds the database connection until the system gives up.What it needs
NSURLSessionConfiguration/NSMutableURLRequest:timeoutIntervalForRequestandtimeoutIntervalForResource, with the same split between API calls and payload transfers. NSURLSession has no direct equivalent of a low-speed limit; the progress of a transfer can be watched through the delegate, or the resource timeout used as an approximation.cloudsync_setkeys, so behaviour does not depend on which transport a build uses.sqlite3_is_interrupted()reports the connection was interrupted, and reportSQLITE_INTERRUPTlike the libcurl path.The unit tests for this live in
test/network_unit.cand are built against libcurl, so the native path needs its own coverage or a manual check on a Mac Catalyst build.