From f174e30a5de3c09c06dcab601812b3bf90102858 Mon Sep 17 00:00:00 2001 From: syo68k Date: Sun, 29 May 2011 19:23:55 +0900 Subject: [PATCH] =?utf8?q?UserStream=E3=81=AE=E6=8E=A5=E7=B6=9A=E3=81=AB?= =?utf8?q?=E5=A4=B1=E6=95=97=E3=81=97=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB?= =?utf8?q?=E5=86=8D=E8=B5=B7=E5=8B=95=E3=81=99=E3=82=8B=E3=81=BE=E3=81=A7U?= =?utf8?q?serStream=E5=8F=97=E4=BF=A1=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA?= =?utf8?q?=E3=81=8F=E3=81=AA=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Tween/Twitter.vb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Tween/Twitter.vb b/Tween/Twitter.vb index 88bb83f0..6fa2d628 100644 --- a/Tween/Twitter.vb +++ b/Tween/Twitter.vb @@ -3274,8 +3274,22 @@ Public Class Twitter End If RaiseEvent Started() + Dim res As HttpStatusCode = twCon.UserStream(st, _allAtreplies, _trackwords, My.Application.Info.ProductName + " v" + fileVersion) + + Select Case res + Case HttpStatusCode.OK + Twitter.AccountState = ACCOUNT_STATE.Valid + Case HttpStatusCode.Unauthorized + Twitter.AccountState = ACCOUNT_STATE.Invalid + End Select + + If st Is Nothing Then + RaiseEvent Stopped() + 'TraceOut("Stop:stream is Nothing") + Thread.Sleep(10 * 1000) + Continue Do + End If - twCon.UserStream(st, _allAtreplies, _trackwords, My.Application.Info.ProductName + " v" + fileVersion) sr = New StreamReader(st) Do While _streamActive AndAlso Not sr.EndOfStream -- 2.11.0