Skip to content

Commit bcc6021

Browse files
fabianfettLukasa
andauthored
Apply suggestions from code review
Co-authored-by: Cory Benfield <[email protected]>
1 parent 519ca3b commit bcc6021

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: Sources/AsyncHTTPClient/ConnectionPool/HTTPRequestStateMachine.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct HTTPRequestStateMachine {
5353
}
5454

5555
enum Action {
56-
enum AfterHeadContinueWith {
56+
enum NextMessageToSend {
5757
case sendEnd
5858
case startBodyStream
5959
}
@@ -137,12 +137,12 @@ struct HTTPRequestStateMachine {
137137
mutating func errorHappened(_ error: Error) -> Action {
138138
switch self.state {
139139
case .initialized:
140-
preconditionFailure("After the state machine has been initialized, start must be called immidiatly. Thus this state is unreachable")
140+
preconditionFailure("After the state machine has been initialized, start must be called immediately. Thus this state is unreachable")
141141
case .running:
142142
self.state = .failed(error)
143143
return .failRequest(error, closeStream: true)
144144
case .finished, .failed:
145-
preconditionFailure("If the request is finished or failed, we expect the connection state machine to remove the request immidiatly from its state. Thus this state is unreachable.")
145+
preconditionFailure("If the request is finished or failed, we expect the connection state machine to remove the request immediately from its state. Thus this state is unreachable.")
146146
}
147147
}
148148

@@ -329,7 +329,7 @@ struct HTTPRequestStateMachine {
329329
preconditionFailure("How can we receive a response head before sending a request head ourselves")
330330

331331
case .running(_, .initialized):
332-
preconditionFailure("How can we receive a response body, if we haven't a received a head")
332+
preconditionFailure("How can we receive a response body, if we haven't received a head")
333333

334334
case .running(let requestState, .receivingBody(let streamState)):
335335
switch streamState {

0 commit comments

Comments
 (0)