From 44bee7f8cef951ec4e5d88f02b21334bc9e21452 Mon Sep 17 00:00:00 2001 From: "Dr. Brandon Wiley" Date: Thu, 1 Oct 2020 14:40:47 -0500 Subject: [PATCH] read fix --- Sources/TransmissionLinux/Connection.swift | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Sources/TransmissionLinux/Connection.swift b/Sources/TransmissionLinux/Connection.swift index 26cc726..b1cf6d2 100644 --- a/Sources/TransmissionLinux/Connection.swift +++ b/Sources/TransmissionLinux/Connection.swift @@ -43,24 +43,23 @@ public class Connection do { - let _ = try self.socket.read(into: &data) - } - catch - { - return nil - } + let bytesRead = try self.socket.read(into: &data) + buffer.append(data[0.. buffer.count + let result = buffer[0.. Bool