opensistemas-hub / osbrain

osBrain - A general-purpose multi-agent system module written in Python
https://osbrain.readthedocs.io/en/stable/
Apache License 2.0
176 stars 43 forks source link

Bind with differt ip host #246

Closed gvacca closed 6 years ago

gvacca commented 6 years ago

HI, i have found a problem when bind a socket whith a different IP host and transfert tcp. If in bind a socket whit an IP whitout oprt, it returns as address 'localhost'., but if bind with IP and port, it return correctly the address with my IP and port. I think that the problem is in the procedure _bind_socket of Agent class ( it lose the information about the host, it should be "addr = host + ':' + str(port)" and not "addr = self.host + ':' + str(port)"

Regards !

Peque commented 6 years ago

Thanks for reporting this issue. We will have a look at it and, if acknowledged, we will include a fix before releasing 0.6.0.

Peque commented 6 years ago

Confirmed. Hopefully fixed by #247. Can you try that patch and see if it fixes your problem?

Peque commented 6 years ago

@gvacca If you want to try the fix you can just:

pip install --upgrade git+git://github.com/Peque/osbrain.git@bindhost
gvacca commented 6 years ago

@Peque , ok, upgraded and work fine !