Merge pull request #150 from harmony-one/HAR-65_fix_listen_issue_on_ec2

HAR-65: fix can't bind address issue on AWS
pull/153/head
Leo Chen 6 years ago committed by GitHub
commit 09efd9ef61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      p2p/host/hostv1/hostv1.go

@ -34,7 +34,7 @@ func (host *HostV1) GetSelfPeer() p2p.Peer {
// BindHandlerAndServe Version 0 p2p. Going to be deprecated.
func (host *HostV1) BindHandlerAndServe(handler p2p.StreamHandler) {
port := host.self.Port
addr := net.JoinHostPort(host.self.IP, port)
addr := net.JoinHostPort("", port)
var err error
host.listener, err = net.Listen("tcp4", addr)
if err != nil {

Loading…
Cancel
Save