From a1a195b1e778f2b5523965c5ded61e57d9303ad5 Mon Sep 17 00:00:00 2001
From: Thulinma <jaron@vietors.com>
Date: Wed, 22 Jul 2015 10:27:41 +0200
Subject: [PATCH] Prevent keepalive on non-initialized userClients when
 negotiating.

---
 src/io.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/io.cpp b/src/io.cpp
index 1a250278..03bc2bc8 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -427,7 +427,9 @@ namespace Mist {
     if (!tid) {
       return;
     }
-    userClient.keepAlive();
+    if (userClient.getData()){
+      userClient.keepAlive();
+    }
     if (trackMap.count(tid) && !trackState.count(tid)) {
       //If the trackmap has been set manually, don't negotiate
       HIGH_MSG("TrackMap manual, not negotiating track IDs");