Revision 35e0fb89
Added by Marc Dequènes about 14 years ago
- ID 35e0fb8910c14b6c4592d585243c0783b1e3f3d8
bin/mapmaker_client | ||
---|---|---|
|
||
def start_work
|
||
contact_peer("MapMaker") do |conv|
|
||
@logger.info "Yo ! Conversation ready with MapMaker (#{conv.identifier}) !"
|
||
if conv
|
||
logger.info "Yo ! Conversation ready with MapMaker (#{conv.identifier}) !"
|
||
else
|
||
logger.error "Could not connect to MapMaker"
|
||
end
|
||
end
|
||
end
|
||
end
|
lib/cyborghood/cyborg/botnet.rb | ||
---|---|---|
if @comm_list.has_key? peer
|
||
block.call @comm_list[peer]
|
||
else
|
||
EventMachine.connect_unix_domain(peer_socket(peer), Conversation, self, &block)
|
||
begin
|
||
EventMachine.connect_unix_domain(peer_socket(peer), Conversation, self, &block)
|
||
rescue
|
||
block.call false
|
||
end
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[fix] BotNet: handle UNIX Socket connect failure (EM.connect fails at once, not via the handler)