Skip to content

Commit

Permalink
geckodriver: Merge pull request mozilla#54 from juangj/master
Browse files Browse the repository at this point in the history
Allow binding to an IPv6 address, if specified.

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 97c5216be449b0a6218985ca520b74c42b6d6843
  • Loading branch information
juangj committed Mar 16, 2016
1 parent eb2eee8 commit 4899b9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/geckodriver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate webdriver;

use std::borrow::ToOwned;
use std::process::exit;
use std::net::{SocketAddr, SocketAddrV4, Ipv4Addr};
use std::net::{SocketAddr, IpAddr};
use std::str::FromStr;
use std::path::Path;

Expand Down Expand Up @@ -89,8 +89,8 @@ fn main() {

let host = &opts.webdriver_host[..];
let port = opts.webdriver_port;
let addr = Ipv4Addr::from_str(host).map(
|x| SocketAddr::V4(SocketAddrV4::new(x, port))).unwrap_or_else(
let addr = IpAddr::from_str(host).map(
|x| SocketAddr::new(x, port)).unwrap_or_else(
|_| {
println!("Invalid host address");
exit(1);
Expand Down

0 comments on commit 4899b9f

Please sign in to comment.