Revision c501ebc2
Added by Marc Dequènes about 14 years ago
- ID c501ebc25c6198ecaf1c6c5e30b6ce5359e1f052
lib/cyborghood/cyborg/botnet.rb | ||
---|---|---|
|
||
require 'cyborghood/cyborg/interface'
|
||
require 'cyborghood/cyborg/conversation'
|
||
require 'set'
|
||
|
||
module CyborgHood
|
||
# default interface if not overridden
|
||
... | ... | |
|
||
def setup
|
||
super
|
||
@pending_conversation_close = []
|
||
@pending_conversation_close = Set.new
|
||
end
|
||
|
||
def peer_socket(peer)
|
lib/cyborghood/cyborg/conversation.rb | ||
---|---|---|
require 'yaml'
|
||
require 'cyborghood/cyborg/session'
|
||
require 'cyborghood/cyborg/protocol'
|
||
require 'set'
|
||
|
||
|
||
module CyborgHood
|
||
... | ... | |
|
||
@protocol = BotProtocol.new(self)
|
||
|
||
@pending_thread_close = []
|
||
@pending_thread_close = Set.new
|
||
@system_notification_processing = @protocol.system_notification.subscribe do |msg|
|
||
process_system_notification(msg)
|
||
end
|
Also available in: Unified diff
[fix] ensure pending threads/conversations are uniquely registered