From 3b7837a42ac055ee97f5cbd7a7cdd8d0bcd447d5 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 14 Jan 2014 13:30:37 +0000 Subject: [PATCH] .developing Turtle git-svn-id: svn://ultimatepp.org/upp/trunk@6775 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- rainbow/Turtle/Event.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rainbow/Turtle/Event.cpp b/rainbow/Turtle/Event.cpp index 6122272f8..34117a08e 100644 --- a/rainbow/Turtle/Event.cpp +++ b/rainbow/Turtle/Event.cpp @@ -63,6 +63,8 @@ bool Ctrl::Connect() } } RLOG("Connection established"); + if(socket.IsError()) + RLOG("CONNECT ERROR: " << socket.GetErrorDesc()); return true; } @@ -101,6 +103,7 @@ void Ctrl::TimerAndPaint() String s = ZCompress(content); if(content.GetCount() > 10) RLOG("Sending " << s.GetLength()); + socket.Timeout(20000); websocket.SendBinary(s); content.Clear(); } @@ -116,6 +119,9 @@ bool Ctrl::IsWaitingEvent() while(!ss.IsEof()) event_queue.AddTail(ss.GetLine()); } + socket.Timeout(20000); + if(socket.IsError()) + RLOG("ERROR: " << socket.GetErrorDesc()); return event_queue.GetCount(); } @@ -143,6 +149,7 @@ void Ctrl::GuiSleep(int ms) // LLOG("GuiSleep"); int level = LeaveGuiMutexAll(); socket.Timeout(ms).WaitRead(); + socket.Timeout(20000); EnterGuiMutex(level); }