 	private let eventObserver: Signal<SessionEvent, Never>.Observer
 
 	///if we are getting variable updates from the server
-	fileprivate var watchingVariables: Bool = false
+	private var watchingVariables: Bool = false
 	///queue used for delegate calls
-	fileprivate let queue: DispatchQueue
+	private let delegateQueue: DispatchQueue
+	/// queue used for app server messages
+	private let appIncomingQueue: DispatchQueue
 	private let (sessionLifetime, sessionToken) = Lifetime.make()
 	public var lifetime: Lifetime { return sessionLifetime }
 	

		if helpCheck?.numberOfRanges == 3 {
			let topic = String(script[(helpCheck?.range(at: 2).toStringRange(script))!])
			let adjScript = script.replacingCharacters(in: (helpCheck?.range.toStringRange(script))!, with: "")
			queue.async { self.delegate?.respondToHelp(topic) }
			guard !adjScript.isEmpty else { return }
			script = adjScript
		}

			guard let fileData = data.fileData else {
				// the file was too large to send via websocket. need to recache and then call delegate
				fileCache.recache(file: ofile).startWithCompleted {
					self.delegateQueue.async { self.delegate?.sessionMessageReceived(response) }
				}
				return
			}
			fileCache.cache(file: ofile.model, withData: fileData).startWithCompleted {
				self.delegateQueue.async { self.delegate?.sessionMessageReceived(response) }
			}
		} else {
			Log.warn("got show output without file downloaded", .session)
			delegateQueue.async { self.delegate?.sessionMessageReceived(response) }
		}
	}
	
	func handleClosed(source: CloseSource, data: SessionResponse.CloseData? = nil, error: Error? = nil) {
		Log.info("got closed message from \(source)", .session)
		connectionOpen = false
		delegateQueue.async {
			self.delegate?.sessionClosed(reason: (source == .error ? error?.localizedDescription : data?.details) ?? "unknown reason")
		}
	}
