Skip to content

Commit

Permalink
Fix disconnect then scan crash (#203)
Browse files Browse the repository at this point in the history
* Fix crashes when a queueable needs to fail due to a queued disconnection, #196

Failing a queueable requires updating a queue, and therefore requires a reference to the queue. The disconnection queued failure block is relatively new, so I didn't catch the new requirement to shuffle the queue assignment to the new starting point of the add call.

* Bump version to 0.8.4, #196
  • Loading branch information
Jeremy Chiang authored Apr 5, 2019
1 parent 1eb3e74 commit 1a7c530
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Bluejay.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |spec|
spec.name = 'Bluejay'
spec.version = '0.8.3'
spec.version = '0.8.4'
spec.license = { type: 'MIT', file: 'LICENSE' }
spec.homepage = 'https://github.com/steamclock/bluejay'
spec.authors = { 'Jeremy Chiang' => 'jeremy@steamclock.com' }
spec.summary = 'Bluejay is a simple Swift framework for building reliable Bluetooth apps.'
spec.homepage = 'https://github.com/steamclock/bluejay'
spec.source = { git: 'https://github.com/steamclock/bluejay.git', tag: 'v0.8.3' }
spec.source = { git: 'https://github.com/steamclock/bluejay.git', tag: 'v0.8.4' }
spec.source_files = 'Bluejay/Bluejay/*.{h,swift}'
spec.framework = 'SystemConfiguration'
spec.platform = :ios, '10.0'
Expand Down
2 changes: 1 addition & 1 deletion Bluejay/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ output: ../docs
author: Steamclock Software
author_url: http://steamclock.com
module: Bluejay
module_version: 0.8.3
module_version: 0.8.4
readme: ../README.md
sdk: iphone
copyright: Copyright © 2017 Steamclock Software. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Bluejay/Bluejay/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.8.3</string>
<string>0.8.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
3 changes: 2 additions & 1 deletion Bluejay/Bluejay/Queue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ class Queue {
preconditionFailure("Cannot enqueue: Bluejay instance is nil.")
}

queueable.queue = self

if isDisconnectionQueued {
queueable.fail(BluejayError.disconnectQueued)
return
}

queueable.queue = self
queue.append(queueable)

/*
Expand Down

0 comments on commit 1a7c530

Please sign in to comment.