diff --git a/Sources/TransmissionLinux/Connection.swift b/Sources/TransmissionLinux/Connection.swift index 25f66ef..8f70ef6 100644 --- a/Sources/TransmissionLinux/Connection.swift +++ b/Sources/TransmissionLinux/Connection.swift @@ -33,6 +33,11 @@ public class Connection public func read(size: Int) -> Data? { + if size == 0 + { + return nil + } + var data = Data(count: size) do