MEChat 1.2.5.pre.pause → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Chat.rb +1 -1
- data/client.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 970e7269319bf1254409794849e9a886384b0ac615c58732413cfb0fbaffdb26
|
4
|
+
data.tar.gz: 6fbe3b25ef02df8ddd82a5d3de0c49eba494468212d6bffdeb33f3c3e2288575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffedf600eedfa4bed9334fbafae153135bc288869f1b349598c704c9ca8f166d3992e2581fa8184a5f3280ab5a114114e9fecbafbc74409ac34a7ee2cd1f339e
|
7
|
+
data.tar.gz: 1c596f8b598b325f42afbecf91528d3dcfe9779398722c09e38242c9d44a4c9391fd36e05d1989e241917aac66059e403a77a50bb2c80269433864efef0fb9ea
|
data/Chat.rb
CHANGED
@@ -36,7 +36,7 @@ class Chat < DistributedChat::ChatService::Service
|
|
36
36
|
def request_critical_section(req,_call)
|
37
37
|
request = {:ip => Addrinfo.getaddrinfo(req.username.split(":")[0..-2].join(":"),req.username.split(":")[-1].to_i)[0], :message => req}
|
38
38
|
if $crit_section === 0
|
39
|
-
@logger.info "Sent reply to #{request[:ip].ip_address}:#{request[:ip].ip_port}, because I am not in critical section"
|
39
|
+
@logger.info "Sent reply to #{request[:ip].ip_address}:#{request[:ip].ip_port}, because I am not in critical section | #{_call}"
|
40
40
|
send_reply ip: request[:ip]
|
41
41
|
elsif $crit_section < 2 && request[:message].timestamp < $alg.clock
|
42
42
|
@logger.info "Sent reply to #{request[:ip].ip_address}:#{request[:ip].ip_port}, because I am entering critical section but my request is newer"
|
data/client.rb
CHANGED
@@ -74,7 +74,6 @@ class Client
|
|
74
74
|
sleep 0.1
|
75
75
|
end
|
76
76
|
$crit_section = 2
|
77
|
-
gets
|
78
77
|
$nodes.each do |node|
|
79
78
|
chat = DistributedChat::ChatService::Stub.new("#{node.address}:#{node.port}", :this_channel_is_insecure)
|
80
79
|
chat.send_message(DistributedChat::Request.new(username: "#{@ip.ip_address}:#{$port.to_s}", message: new_msg, timestamp: $alg.clock))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MEChat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.5
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Kaufmann
|
@@ -140,9 +140,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubygems_version: 3.4.10
|
148
148
|
signing_key:
|