Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connAuxRequest() returns addr 0.0.0.0 #156

Open
jorge-goncalves opened this issue Sep 11, 2023 · 0 comments
Open

connAuxRequest() returns addr 0.0.0.0 #156

jorge-goncalves opened this issue Sep 11, 2023 · 0 comments

Comments

@jorge-goncalves
Copy link

When trying to listen to an event on a server behind a firewall I am getting the address 0.0.0.0 instead of the address of the server in function

  func (s *Subscription) getEventManager() (*eventManager, error){
     auxHandle, addr, port, err := s.connAuxRequest()

switching to using the address of the main link solved the problem

func (s *Subscription) getEventManager() (*eventManager, error) {
	auxHandle, addr, port, err := s.connAuxRequest()
	if err != nil {
		return nil, err
	}
	var address string
	if addr.String() != "0.0.0.0" {
		address = addr.String() + ":" + strconv.Itoa(port)
	} else {
		addr := s.fc.dsn.addr
		if idx := strings.Index(s.fc.dsn.addr, ":"); idx > 0 {
			addr = s.fc.dsn.addr[0:idx]
		}

		address = addr + ":" + strconv.Itoa(port)
	}
.......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant