work on sockets
This commit is contained in:
parent
fa701f37dc
commit
8b4105fac4
@ -120,6 +120,7 @@ class OnionrSocketClient:
|
|||||||
|
|
||||||
def startSocket(self, peer, reason):
|
def startSocket(self, peer, reason):
|
||||||
address = ''
|
address = ''
|
||||||
|
logger.info('Trying to find socket server for %s' % (peer,))
|
||||||
# Find the newest open socket for a given peer
|
# Find the newest open socket for a given peer
|
||||||
for block in self._core.getBlocksByType('socket'):
|
for block in self._core.getBlocksByType('socket'):
|
||||||
block = onionrblockapi.Block(block, core=self._myCore)
|
block = onionrblockapi.Block(block, core=self._myCore)
|
||||||
@ -128,7 +129,8 @@ class OnionrSocketClient:
|
|||||||
address = block.getMetadata('address')
|
address = block.getMetadata('address')
|
||||||
if self._core._utils.validateID(address):
|
if self._core._utils.validateID(address):
|
||||||
# If we got their address, it is valid, and verified, we can break out
|
# If we got their address, it is valid, and verified, we can break out
|
||||||
break
|
if block.getMetadata('reason') == 'chat':
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
address = ''
|
address = ''
|
||||||
if address != '':
|
if address != '':
|
||||||
|
Loading…
Reference in New Issue
Block a user