cakedb 0.0.14 → 0.0.15
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.
- data/lib/cakedb.rb +7 -2
- metadata +2 -2
data/lib/cakedb.rb
CHANGED
@@ -6,6 +6,8 @@ class CakeDB
|
|
6
6
|
def initialize( server="127.0.0.1", port=8888, lvl=0 )
|
7
7
|
#puts "Connection Initiated"
|
8
8
|
@server = TCPSocket.new(server, port)
|
9
|
+
@s = server
|
10
|
+
@p = port
|
9
11
|
@sids = {}
|
10
12
|
@loggingLevel = lvl
|
11
13
|
@timeout = 30
|
@@ -48,11 +50,14 @@ class CakeDB
|
|
48
50
|
data += @server.recv(length-got)
|
49
51
|
got = data.bytesize
|
50
52
|
if Time.now > timeOver
|
51
|
-
raise "Timeout on incomplete read, returning what I had"
|
52
53
|
if @loggingLevel == 1
|
53
54
|
puts "Timeout Hit. GT #{timeOver}"
|
54
55
|
end
|
55
|
-
|
56
|
+
@server.close()
|
57
|
+
@sids = {}
|
58
|
+
@server = TCPSocket.new(@s, @p)
|
59
|
+
raise "Timeout on incomplete read, returning what I had"
|
60
|
+
#return data
|
56
61
|
end
|
57
62
|
if @loggingLevel == 2 && got < length
|
58
63
|
puts "Incomplete read on payload receive"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cakedb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: CakeDB Ruby Driver
|
15
15
|
email: david@hows.id.au
|