rethinkdb 1.16.0.0 → 1.16.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/net.rb +10 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1794895a9ff42acedd81e8a39670e7ebdbcda21
4
- data.tar.gz: 7eb72083c471ad5e32cbbbd02dbc403d897db87c
3
+ metadata.gz: 3f11a0723b23f0f85750e89da95f68a9bc50f70c
4
+ data.tar.gz: fc81d994d1b54b887a7228f7d80b8c5a07a9016c
5
5
  SHA512:
6
- metadata.gz: 0c089f1c39bbaeaf3b467cd7601db23e7558e38933497fb178e00916d3000281defaf4c05cb28ee7766274c31e8d9b163091e8975028fdde5e75d83e10014313
7
- data.tar.gz: e5acd237522ca83acb6f6302cf35359599c9adb6dfcc43a6f43d6684dc012b3e6c8ff8542d73ac73dd4e63774678b4b606e3685657f42211b29d229525d9c983
6
+ metadata.gz: ef85ef58f60f5ab17790c61dc4121943cc4d29fad9cea95f16dda9c6338865be98bbdab496ec1cbbc7671728fd10f8be397be3c07ba39548d0ceda4efc306681
7
+ data.tar.gz: d8a59acf79a53e9ccc8d9e20b4ebe8f84d804003270be43e203e5204589ab435ceb4b167e732a216cf8dcddfa4406b727579dddddf3fa9d5249fb69f3af01091
data/lib/net.rb CHANGED
@@ -215,7 +215,14 @@ module RethinkDB
215
215
  end
216
216
 
217
217
  def send packet
218
- @socket.write(packet)
218
+ written = 0
219
+ while written < packet.length
220
+ # Supposedly slice will not copy the array if it goes all the way to the end
221
+ # We use IO::syswrite here rather than IO::write because of incompatibilities in
222
+ # JRuby regarding filling up the TCP send buffer.
223
+ # Reference: https://github.com/rethinkdb/rethinkdb/issues/3795
224
+ written += @socket.syswrite(packet.slice(written, packet.length))
225
+ end
219
226
  end
220
227
 
221
228
  def dispatch(msg, token)
@@ -363,8 +370,8 @@ module RethinkDB
363
370
  }
364
371
  end
365
372
  end
366
- @socket.write([@@magic_number, @auth_key.size].pack('L<L<') +
367
- @auth_key + [@@wire_protocol].pack('L<'))
373
+ send([@@magic_number, @auth_key.size].pack('L<L<') +
374
+ @auth_key + [@@wire_protocol].pack('L<'))
368
375
  response = ""
369
376
  while response[-1..-1] != "\0"
370
377
  response += @socket.read_exn(1, 20)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rethinkdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0.0
4
+ version: 1.16.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RethinkDB Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-30 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json