Skip to content

Commit 4231ad5

Browse files
committed
EventSource initializer refactoring
1 parent 61e802d commit 4231ad5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/EventSource/EventSource.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ public struct EventSource: Sendable {
5050
public var timeoutInterval: TimeInterval
5151

5252
public init(mode: Mode = .default, timeoutInterval: TimeInterval = 300) {
53-
self.mode = mode
54-
self.eventParser = { ServerEventParser(mode: mode) }
55-
self.timeoutInterval = timeoutInterval
53+
self.init(mode: mode, eventParser: ServerEventParser(mode: mode), timeoutInterval: timeoutInterval)
5654
}
5755

5856
public init(

0 commit comments

Comments
 (0)