Skip to content

Commit

Permalink
Better code
Browse files Browse the repository at this point in the history
  • Loading branch information
bpaquet committed Dec 3, 2024
1 parent 4bb9f81 commit 9df28da
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions load_test/lib/load_test/user/sse.ex
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,9 @@ defmodule SseUser do
end

defp check_message(state, received_message, expected_message) do
[first | after_first] = String.split(received_message, "\n")
[first, _, third | _] = String.split(received_message, "\n")
[_, id] = String.split(first, " ")

[_ | after_second] = after_first
[third | _] = after_second

try do
[_, ts, message, _, _] = String.split(third, " ", parts: 5)
current_ts = :os.system_time(:millisecond)
Expand Down

0 comments on commit 9df28da

Please sign in to comment.