Skip to content

Commit 979fb51

Browse files
Fixing writeTo
1 parent 4aedb59 commit 979fb51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/PutInferenceModelAction.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ public void writeTo(StreamOutput out) throws IOException {
9696
taskType.writeTo(out);
9797
out.writeBytesReference(content);
9898
XContentHelper.writeTo(out, contentType);
99-
out.writeTimeValue(timeout);
99+
100+
if (out.getTransportVersion().onOrAfter(TransportVersions.INFERENCE_ADD_TIMEOUT_PUT_ENDPOINT)
101+
|| out.getTransportVersion().isPatchFrom(TransportVersions.INFERENCE_ADD_TIMEOUT_PUT_ENDPOINT_8_19)) {
102+
out.writeTimeValue(timeout);
103+
}
100104
}
101105

102106
@Override

0 commit comments

Comments
 (0)