bunny 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/ChangeLog.md +12 -0
 - data/lib/bunny/transport.rb +43 -20
 - data/lib/bunny/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 09f980320596ae3eead897e92cb66d74c632a257
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6b3b92232fdced1f96c90d452136b3f46e1f6a42
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 45314827e8cb6c002b78699925f78c07e68222ad3c7d7ff3bec9ccad9160285fd9a0bbbbac820acf8b54f11ce52671578b1c8f554db27233341784c65f399100
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 303c9cee35b6ca65a1e15ce15cbaded1b82564b9749dba146da44f02f1bed7e7bc0564754ac6e00d619e7c06307d45d85a9908ccefce34d23272a1ab3aed99bb
         
     | 
    
        data/ChangeLog.md
    CHANGED
    
    | 
         @@ -1,3 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## Changes between Bunny 1.6.1 and 1.6.2
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ### JRuby Writes Fixes
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            On JRuby, Bunny reverts back to using plain old `write(2)` for writes. The CRuby implementation
         
     | 
| 
      
 6 
     | 
    
         
            +
            on JRuby suffers from I/O incompatibilities. Until JRuby
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Bunny users who run on JRuby are highly recommended to switch to [March Hare](http://rubymarchhare.info),
         
     | 
| 
      
 9 
     | 
    
         
            +
            which has nearly identical API and is significantly more efficient.
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       1 
13 
     | 
    
         
             
            ## Changes between Bunny 1.6.0 and 1.6.1
         
     | 
| 
       2 
14 
     | 
    
         | 
| 
       3 
15 
     | 
    
         
             
            ### Bunny::Session#with_channel Synchornisation Improvements
         
     | 
    
        data/lib/bunny/transport.rb
    CHANGED
    
    | 
         @@ -101,28 +101,51 @@ module Bunny 
     | 
|
| 
       101 
101 
     | 
    
         
             
                  block.call(@tls_context) if @tls_context
         
     | 
| 
       102 
102 
     | 
    
         
             
                end
         
     | 
| 
       103 
103 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
                 
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
      
 104 
     | 
    
         
            +
                if defined?(JRUBY_VERSION)
         
     | 
| 
      
 105 
     | 
    
         
            +
                  # Writes data to the socket.
         
     | 
| 
      
 106 
     | 
    
         
            +
                  def write(data)
         
     | 
| 
      
 107 
     | 
    
         
            +
                    return write_without_timeout(data) unless @write_timeout
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                    begin
         
     | 
| 
      
 110 
     | 
    
         
            +
                      if open?
         
     | 
| 
      
 111 
     | 
    
         
            +
                        @writes_mutex.synchronize do
         
     | 
| 
      
 112 
     | 
    
         
            +
                          @socket.write(data)
         
     | 
| 
      
 113 
     | 
    
         
            +
                        end
         
     | 
| 
      
 114 
     | 
    
         
            +
                      end
         
     | 
| 
      
 115 
     | 
    
         
            +
                    rescue SystemCallError, Timeout::Error, Bunny::ConnectionError, IOError => e
         
     | 
| 
      
 116 
     | 
    
         
            +
                      @logger.error "Got an exception when sending data: #{e.message} (#{e.class.name})"
         
     | 
| 
      
 117 
     | 
    
         
            +
                      close
         
     | 
| 
      
 118 
     | 
    
         
            +
                      @status = :not_connected
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                      if @session.automatically_recover?
         
     | 
| 
      
 121 
     | 
    
         
            +
                        @session.handle_network_failure(e)
         
     | 
| 
      
 122 
     | 
    
         
            +
                      else
         
     | 
| 
      
 123 
     | 
    
         
            +
                        @session_thread.raise(Bunny::NetworkFailure.new("detected a network failure: #{e.message}", e))
         
     | 
| 
       115 
124 
     | 
    
         
             
                      end
         
     | 
| 
       116 
125 
     | 
    
         
             
                    end
         
     | 
| 
       117 
     | 
    
         
            -
                   
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
                     
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                     
     | 
| 
       125 
     | 
    
         
            -
                       
     | 
| 
      
 126 
     | 
    
         
            +
                  end
         
     | 
| 
      
 127 
     | 
    
         
            +
                else
         
     | 
| 
      
 128 
     | 
    
         
            +
                  # Writes data to the socket. If read/write timeout was specified the operation will return after that
         
     | 
| 
      
 129 
     | 
    
         
            +
                  # amount of time has elapsed waiting for the socket.
         
     | 
| 
      
 130 
     | 
    
         
            +
                  def write(data)
         
     | 
| 
      
 131 
     | 
    
         
            +
                    return write_without_timeout(data) unless @write_timeout
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
                    begin
         
     | 
| 
      
 134 
     | 
    
         
            +
                      if open?
         
     | 
| 
      
 135 
     | 
    
         
            +
                        @writes_mutex.synchronize do
         
     | 
| 
      
 136 
     | 
    
         
            +
                          @socket.write_nonblock_fully(data, @write_timeout)
         
     | 
| 
      
 137 
     | 
    
         
            +
                        end
         
     | 
| 
      
 138 
     | 
    
         
            +
                      end
         
     | 
| 
      
 139 
     | 
    
         
            +
                    rescue SystemCallError, Timeout::Error, Bunny::ConnectionError, IOError => e
         
     | 
| 
      
 140 
     | 
    
         
            +
                      @logger.error "Got an exception when sending data: #{e.message} (#{e.class.name})"
         
     | 
| 
      
 141 
     | 
    
         
            +
                      close
         
     | 
| 
      
 142 
     | 
    
         
            +
                      @status = :not_connected
         
     | 
| 
      
 143 
     | 
    
         
            +
             
     | 
| 
      
 144 
     | 
    
         
            +
                      if @session.automatically_recover?
         
     | 
| 
      
 145 
     | 
    
         
            +
                        @session.handle_network_failure(e)
         
     | 
| 
      
 146 
     | 
    
         
            +
                      else
         
     | 
| 
      
 147 
     | 
    
         
            +
                        @session_thread.raise(Bunny::NetworkFailure.new("detected a network failure: #{e.message}", e))
         
     | 
| 
      
 148 
     | 
    
         
            +
                      end
         
     | 
| 
       126 
149 
     | 
    
         
             
                    end
         
     | 
| 
       127 
150 
     | 
    
         
             
                  end
         
     | 
| 
       128 
151 
     | 
    
         
             
                end
         
     | 
    
        data/lib/bunny/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bunny
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.6.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Duncan
         
     | 
| 
         @@ -12,7 +12,7 @@ authors: 
     | 
|
| 
       12 
12 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       14 
14 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       15 
     | 
    
         
            -
            date: 2014-11- 
     | 
| 
      
 15 
     | 
    
         
            +
            date: 2014-11-07 00:00:00.000000000 Z
         
     | 
| 
       16 
16 
     | 
    
         
             
            dependencies:
         
     | 
| 
       17 
17 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       18 
18 
     | 
    
         
             
              name: amq-protocol
         
     |