lib/onstomp/client.rb in onstomp-1.0.4 vs lib/onstomp/client.rb in onstomp-1.0.5

- old
+ new

@@ -77,9 +77,12 @@ # Connects to the STOMP broker referenced by {#uri}. Includes optional # headers in the CONNECT frame, if specified. # @param [{#to_sym => #to_s}] headers # @return [self] def connect headers={} + # FIXME: This is a quick fix to force the Threaded IO processor to + # complete its work before we establish a connection. + processor_inst.stop @connection = OnStomp::Connections.connect self, headers, { :'accept-version' => @versions.join(','), :host => @host, :'heart-beat' => @heartbeats.join(','), :login => @login, :passcode => @passcode }, pending_connection_events, read_timeout, write_timeout