 				disconnect(withError: stream.streamError)
 			case Stream.Event.hasBytesAvailable:
 				let data = inputStream!.readAllData()
-				delegateQueue?.async {
+				delegateQueue.async {
 					self.delegate?.socket(self, didReceiveData: data)
 				}
 			case Stream.Event.endEncountered:

			}
			self.disposeStreams()
			self.status = .closed(error)
			self.delegateQueue?.async {
				self.delegate?.socket(self, didDisconnectWithError: error)
			}
		}

	public init(with config: Config) {
		self.unsafeConfig = config
		self.unsafeStatus = .closed(nil)
		self.unsafeDelegateQueue = DispatchQueue.main
		inputStreamDelegate = StreamDelegate(cInputStream)
		outputStreamDelegate = StreamDelegate(cOutputStream)
	}
