Skip to content

Commit

Permalink
Deprecate Grid1HeartbeatServlet and remove dead code in Hub.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mach6 authored and Doug Simmons committed Oct 6, 2016
1 parent 63a3019 commit ac78247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
20 changes: 1 addition & 19 deletions java/server/src/org/openqa/grid/web/Hub.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class Hub {
private static final Logger log = Logger.getLogger(Hub.class.getName());

private GridHubConfiguration config;
private final boolean isHostRestricted;
private final Registry registry;
private final Map<String, Class<? extends Servlet>> extraServlet = Maps.newHashMap();

Expand All @@ -79,12 +78,9 @@ public Hub(GridHubConfiguration gridHubConfiguration) {
registry = Registry.newInstance(this, gridHubConfiguration);

config = gridHubConfiguration;
if (config.host != null) {
isHostRestricted = true;
} else {
if (config.host == null) {
NetworkUtils utils = new NetworkUtils();
config.host = utils.getIp4NonLoopbackAddressOfThisMachine().getHostAddress();
isHostRestricted = false;
}

if (config.port == null) {
Expand Down Expand Up @@ -158,20 +154,6 @@ private void initServer() {
http.setPort(config.port);

server.addConnector(http);
// if (isHostRestricted) {
//// httpConfig.
// }
// httpConfig.setL


// SocketConnector socketListener = new SocketConnector();
// socketListener.setMaxIdleTime(60000);
// if (isHostRestricted) {
// socketListener.setHost(host);
// }
// socketListener.setPort(port);
// socketListener.setLowResourcesMaxIdleTime(6000);
// server.addConnector(socketListener);

ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
root.setContextPath("/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* Provided for compatibility with Selenium Grid 1.0 clients. Responds to heartbeat requests and
* indicates whether or not a node is registered with the hub.
*/
@Deprecated
public class Grid1HeartbeatServlet extends RegistryBasedServlet {
private static final long serialVersionUID = 7653463271803124556L;

Expand Down

0 comments on commit ac78247

Please sign in to comment.