Skip to content

connAuxRequest() returns addr 0.0.0.0 #156

@jorge-goncalves

Description

@jorge-goncalves

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)
	}
.......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions