Skip to content
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

issue # 49 Rename and possibly move static method for determining local ephemeral address #85

Merged
merged 5 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/opensearch/sdk/ActionListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ActionListener {
* @throws UnknownHostException if the local host name could not be resolved into an address.
*/
@SuppressForbidden(reason = "need local ephemeral port")
protected static InetSocketAddress getLocalEphemeral() throws UnknownHostException {
protected static InetSocketAddress createLocalEphemeralAddress() throws UnknownHostException {
return new InetSocketAddress(InetAddress.getLocalHost(), 0);
}

Expand All @@ -50,7 +50,7 @@ public void runActionListener(boolean flag, int timeout) {
// for testing considerations, otherwise zero which is interpreted as an infinite timeout
socket.setSoTimeout(timeout);

socket.bind(getLocalEphemeral(), 1);
socket.bind(createLocalEphemeralAddress(), 1);
socket.setReuseAddress(true);

Thread t = new Thread() {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ public void startTransportService(TransportService transportService) {
false,
false,
InitializeExtensionsRequest::new,
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you missed a merge conflict

(request, channel, task) -> channel.sendResponse(handlePluginsRequest(request))
=======
(request, channel, task) -> channel.sendResponse(handleExtensionInitRequest(request))
>>>>>>> fd0f0708c14bf39c139b4cdea36b01839786a5ca
);

transportService.registerRequestHandler(
Expand Down