selfsdk 0.0.208 → 0.0.209

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/messaging.rb +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be41ecda5ddbb6276191c2029ab98b59126653f1f35d4f945d2dcaab9e8b80d7
4
- data.tar.gz: 2dcb8dac666227efba044623b519d9ece6bc8344ca6cd64f3ceea819e631f8b0
3
+ metadata.gz: 4adb1d39e345e27532a012a26dcd8711fc245b2e93baa81890c6539cd8cf5424
4
+ data.tar.gz: d2e725fb3ab955237186ba7c5d9eca6e2083e4a4144b4a1f7d59b96f92e7ee59
5
5
  SHA512:
6
- metadata.gz: dd4b44ab85cfb84e90e4215ef107c69f38c2873110968be9664819624bbf0bfc786eab0f5605294595a987c2668bca73f8e265cd6a4e0e64f2b8b83b8dc364c5
7
- data.tar.gz: 3ae22aec59e8196a27a90f0cec7f391186a7009369ab688d3f96cc00bd7d7d9c7000fac5b1d0dce5110cc7afb1d594ce87061c86cee0736fb71282454d47d1de
6
+ metadata.gz: a916f8c596495f580ee4b29c8e253325be6409133bb5eafb7df398b8848aef5148acc44cee6302d3ad25a1136c9e2344add606290ad49f2bc0be7a081b83b939
7
+ data.tar.gz: 51790af7cb7fb53f911c7484584deb733f4d55b9d151b23a4086cab356946cf95c066449a307dd20be755ea33a0db0d287596bb247414446de89f2d3b8866e9e
data/lib/messaging.rb CHANGED
@@ -439,9 +439,7 @@ module SelfSDK
439
439
  end
440
440
 
441
441
  def process_incomming_message(input)
442
- message = SelfSDK::Messages.parse(input, self)
443
- @offset = input.offset
444
- write_offset(@offset)
442
+ message = parse_and_write_offset(input)
445
443
 
446
444
  if @messages.include? message.id
447
445
  message.validate! @messages[message.id][:original_message]
@@ -459,6 +457,12 @@ module SelfSDK
459
457
  nil
460
458
  end
461
459
 
460
+ def parse_and_write_offset(input)
461
+ SelfSDK::Messages.parse(input, self)
462
+ ensure
463
+ write_offset(input.offset)
464
+ end
465
+
462
466
  # Authenticates current client on the websocket server.
463
467
  def authenticate
464
468
  @auth_id = SecureRandom.uuid if @auth_id.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selfsdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.208
4
+ version: 0.0.209
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aldgate Ventures