 	
 	public init(with config: Config) {
 		self.config = config
-		self.status = .closed
+		self.status = .closed(nil)
 		inputStreamDelegate = StreamDelegate(cInputStream)
 		outputStreamDelegate = StreamDelegate(cOutputStream)
 	}

	public func disconnect() {
		TCPSocket.workingThread.perform {
			self.disposeStreams()
			self.status = .closed
			self.delegateQueue?.async {
				self.delegate?.socketDidDisconnect(self)
			}

	}
	
	private func handleError(error: Error) {
		if case .closed = status {
			return
		}
		status = .closed(error)
		delegateQueue?.async {
			self.delegate?.socket(self, didFailWithError: error)
		}
