Skip to content

Commit bbcc802

Browse files
authored
Update lori dependency from 0.11.0 to 0.12.0 (#48)
Lori 0.12.0 adds ConnectionFailedTimeout to ConnectionFailureReason, requiring a new match branch and corresponding redis-layer primitive.
1 parent 6108713 commit bbcc802

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ make stop-redis
2525

2626
## Dependencies
2727

28-
- `ponylang/lori` (0.11.0) — TCP networking (transitively depends on `ponylang/ssl`, hence the `ssl=` build flag)
28+
- `ponylang/lori` (0.12.0) — TCP networking (transitively depends on `ponylang/ssl`, hence the `ssl=` build flag)
2929

3030
## Architecture
3131

@@ -50,7 +50,7 @@ Package: `redis`
5050
- `_ResponseHandler` (in `_response_handler.pony`): Loops `_RespParser` over a `buffered.Reader`, routing `RespPush` to `on_push` and other `RespValue`s to `on_response`. Shuts down on `RespMalformed`.
5151
- `_BuildHelloCommand` / `_BuildAuthCommand` (primitives in `session.pony`): Build HELLO 3 and AUTH commands for protocol negotiation and authentication.
5252
- `_BufferedSend` (class val in `session.pony`): Serialized command buffered during backpressure. Holds wire-format bytes and an optional `_QueuedCommand` for response matching.
53-
- `ConnectionFailureReason` (type alias in `connection_failure_reason.pony`): `(ConnectionFailedDNS | ConnectionFailedTCP | ConnectionFailedSSL)`. Passed to `redis_session_connection_failed` to identify the failure stage.
53+
- `ConnectionFailureReason` (type alias in `connection_failure_reason.pony`): `(ConnectionFailedDNS | ConnectionFailedTCP | ConnectionFailedSSL | ConnectionFailedTimeout)`. Passed to `redis_session_connection_failed` to identify the failure stage.
5454
- `_IllegalState` / `_Unreachable` (in `_mort.pony`): Primitives for detecting impossible states.
5555

5656
### Command Builders

corral.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"deps": [
1414
{
1515
"locator": "github.com/ponylang/lori.git",
16-
"version": "0.11.0"
16+
"version": "0.12.0"
1717
}
1818
]
1919
}

redis/connection_failure_reason.pony

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,13 @@ primitive ConnectionFailedSSL
1313
The SSL/TLS handshake failed before the connection was established.
1414
"""
1515

16+
primitive ConnectionFailedTimeout
17+
"""
18+
The connection attempt timed out before completing.
19+
"""
20+
1621
type ConnectionFailureReason is
17-
(ConnectionFailedDNS | ConnectionFailedTCP | ConnectionFailedSSL)
22+
( ConnectionFailedDNS
23+
| ConnectionFailedTCP
24+
| ConnectionFailedSSL
25+
| ConnectionFailedTimeout )

redis/session.pony

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ actor Session is (lori.TCPConnectionActor & lori.ClientLifecycleEventReceiver)
121121
| let _: lori.ConnectionFailedDNS => ConnectionFailedDNS
122122
| let _: lori.ConnectionFailedTCP => ConnectionFailedTCP
123123
| let _: lori.ConnectionFailedSSL => ConnectionFailedSSL
124+
| let _: lori.ConnectionFailedTimeout => ConnectionFailedTimeout
124125
end
125126
state.on_failure(this, r)
126127

redis/session_status_notify.pony

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ interface tag SessionStatusNotify
1717
=>
1818
"""
1919
Called when the connection to the server fails. The `reason` identifies
20-
the failure stage: DNS resolution, TCP connection, or SSL/TLS handshake.
20+
the failure stage: DNS resolution, TCP connection, SSL/TLS handshake,
21+
or connection timeout.
2122
The session is terminal after this callback.
2223
"""
2324
None

0 commit comments

Comments
 (0)