 	public func shutdown() throws {
 		guard state == .connected else {
 			Log.info("asked to shutdown when not running")
-			return
+			throw ComputeError.notConnected
 		}
 		try send(data: compute.close())
 	}

}

/// used for a state machine of the connection status
private enum ComputeState: Int, CaseIterable {
	case uninitialized
	case connected
}

	private(set) weak var delegate: ComputeWorkerDelegate?
	private let encoder = AppSettings.createJSONEncoder()
	private let decoder = AppSettings.createJSONDecoder()
	private(set) var state : ComputeState = .uninitialized
	private let compute = ComputeCoder()
	
	public init(workspace: Workspace, sessionId: Int, socket: NetTCP, config: AppConfiguration, delegate: ComputeWorkerDelegate) {
