• Juan Batiz-Benet's avatar
    reuseport: env var to turn it off · 9dbbe6db
    Juan Batiz-Benet authored
    reuseport is a hack. It is necessary for us to do certain kinds of
    tcp nat traversal. Ideally, reuseport would be available in go:
    
      https://github.com/golang/go/issues/9661
    
    But until that issue is fixed, we're stuck with this. In some cases,
    reuseport is strictly a detriment: nodes are not NATed. This commit
    introduces an ENV var IPFS_REUSEPORT that can be set to false to
    avoid using reuseport entirely:
    
      IPFS_REUSEPORT=false ipfs daemon
    
    This approach addresses our current need. It could become a config
    var if necessary. If reuseport continues to give problems, we should
    look into improving it.
    9dbbe6db
reuseport.go 1.01 KB