added dial time out

pull/39/head
Richard Liu 6 years ago
parent 41e9b997ad
commit fe2a0b61bf
  1. 2
      aws-experiment-launch/experiment/commander/main.go
  2. 3
      aws-experiment-launch/spot-instance/userdata.sh

@ -119,7 +119,7 @@ func dictateNodes(command string) {
func dictateNode(addr string, command string) {
// creates client
conn, err := net.Dial("tcp", addr)
conn, err := net.DialTimeout("tcp", addr, 5*time.Second)
if err != nil {
log.Println(err)
return

@ -9,8 +9,7 @@ curl http://$commanderIP:8080/txgen -o txgen
chmod +x ./txgen
# Get My IP
wget http://169.254.169.254/latest/meta-data/public-ipv4
ip=$(head -n 1 public-ipv4)
ip=`curl http://169.254.169.254/latest/meta-data/public-ipv4`
node_port=9000
soldier_port=1$node_port

Loading…
Cancel
Save