-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent event id for echo #3
base: master
Are you sure you want to change the base?
Conversation
src/main/kotlin/com/exactpro/th2/ws/client/api/impl/WebSocketClient.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/ws/client/api/impl/WebSocketClient.kt
Outdated
Show resolved
Hide resolved
# Conflicts: # README.md # gradle.properties # src/main/kotlin/com/exactpro/th2/ws/client/api/impl/WebSocketClient.kt
# Conflicts: # README.md # gradle.properties
@@ -152,7 +154,7 @@ fun run( | |||
require(messagesCount == 1) { "Message group contains more than 1 message" } | |||
val message = messagesList[0] | |||
require(message.hasRawMessage()) { "Message in the group is not a raw message" } | |||
settings.frameType.send(client, message.rawMessage.body.toByteArray()) | |||
settings.frameType.send(client, message.rawMessage.body.toByteArray(), message.rawMessage.parentEventId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
message.rawMessage.parentEventId
It'll always be non-null. We should check its presence through hasParentEventId
method instead and pass null
if it returns false
@@ -121,7 +122,7 @@ class WebSocketClient( | |||
if (last) { | |||
val message = if (binaryFrames.isEmpty()) frame else binaryFrames.reduce(ByteArray::plus) | |||
handler.onBinary(this, message) | |||
onMessage(message, false, FIRST) | |||
onMessage(message, true, FIRST, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onMessage(message, true, FIRST, null) | |
onMessage(message, false, FIRST, null) |
No description provided.