From d4ecfcceec11eabd364fb0d0ef7fd7d7e8fdcf41 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Sun, 13 Aug 2017 17:31:58 +0200
Subject: [PATCH] Tweak DuplexPipe to set key instead of data when separator is
 missing

---
 lib/TweetLib.Communication/DuplexPipe.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/TweetLib.Communication/DuplexPipe.cs b/lib/TweetLib.Communication/DuplexPipe.cs
index 922c90cb..4810dc0e 100644
--- a/lib/TweetLib.Communication/DuplexPipe.cs
+++ b/lib/TweetLib.Communication/DuplexPipe.cs
@@ -46,8 +46,8 @@ private void ReaderThread(){
             }
         }
 
-        public void Write(string data){
-            writerStream.WriteLine(data);
+        public void Write(string key){
+            writerStream.WriteLine(key);
             writerStream.Flush();
         }
 
@@ -95,8 +95,8 @@ internal PipeReadEventArgs(string line){
                 int separatorIndex = line.IndexOf(Separator, StringComparison.Ordinal);
 
                 if (separatorIndex == -1){
-                    Key = string.Empty;
-                    Data = line;
+                    Key = line;
+                    Data = string.Empty;
                 }
                 else{
                     Key = line.Substring(0, separatorIndex);