 	
 	public func connect() {
 		TCPSocket.workingThread.perform {
-			guard self.status == .closed || self.status == .error else {
+			guard case .closed = self.status else {
 				return
 			}
 			self.status = .opening

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

	}
	
	private func handleOpenning() {
		guard case .opening = status, inputStream!.streamStatus == .open, outputStream!.streamStatus == .open else {
			return
		}
		status = .opened
