OSDN Git Service

LazyJson<T>に対するIgnoreResponseの呼び出し忘れを修正
authorKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Mar 2017 07:16:16 +0000 (16:16 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Mar 2017 07:16:16 +0000 (16:16 +0900)
IgnoreResponse の呼び出しを怠るとレスポンスボディのストリームが開いたまま
放置されるため、同時接続数の上限に達して API アクセスが不能になる場合がある

OpenTween/ListManage.cs
OpenTween/MyLists.cs
OpenTween/Resources/ChangeLog.txt
OpenTween/Tween.cs

index 364198a..9371d09 100644 (file)
@@ -233,7 +233,8 @@ namespace OpenTween
                 {
                     try
                     {
-                        await this.tw.Api.ListsMembersDestroy(list.Id, user.ScreenName);
+                        await this.tw.Api.ListsMembersDestroy(list.Id, user.ScreenName)
+                            .IgnoreResponse();
                     }
                     catch (WebApiException ex)
                     {
index 1237a92..07a32f8 100644 (file)
@@ -34,6 +34,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using OpenTween.Api;
+using OpenTween.Connection;
 using OpenTween.Api.DataModel;
 
 namespace OpenTween
@@ -107,7 +108,8 @@ namespace OpenTween
         {
             try
             {
-                await this.twitterApi.ListsMembersCreate(list.Id, this.contextScreenName);
+                await this.twitterApi.ListsMembersCreate(list.Id, this.contextScreenName)
+                    .IgnoreResponse();
 
                 var index = this.ListsCheckedListBox.Items.IndexOf(list);
                 this.ListsCheckedListBox.SetItemCheckState(index, CheckState.Checked);
@@ -122,7 +124,8 @@ namespace OpenTween
         {
             try
             {
-                await this.twitterApi.ListsMembersDestroy(list.Id, this.contextScreenName);
+                await this.twitterApi.ListsMembersDestroy(list.Id, this.contextScreenName)
+                    .IgnoreResponse();
 
                 var index = this.ListsCheckedListBox.Items.IndexOf(list);
                 this.ListsCheckedListBox.SetItemCheckState(index, CheckState.Unchecked);
index 9683ba8..c6d4bf3 100644 (file)
@@ -17,6 +17,7 @@
  * FIX: 「前データを取得」の後に通常の更新が行われると、次に「前データを取得」した際に1件も取得されない不具合を修正
  * FIX: 発言一覧の更新時にエラーが発生する不具合を回避
  * FIX: 短縮URLの生成中に投稿欄のテキストが変更されるとエラーが発生する不具合を修正
+ * FIX: フォロー状態の変更やリストに対する追加・削除を行うと、起動し直すまでその後のAPIアクセスが不能になる場合がある不具合を修正
 
 ==== Ver 1.3.6(2016/11/22)
  * NEW: 画像アップロード時のタイムアウト時間が変更できるようになりました
index 6bf4f12..81a3951 100644 (file)
@@ -10301,7 +10301,7 @@ namespace OpenTween
             {
                 try
                 {
-                    var task = this.twitterApi.FriendshipsCreate(id);
+                    var task = this.twitterApi.FriendshipsCreate(id).IgnoreResponse();
                     await dialog.WaitForAsync(this, task);
                 }
                 catch (WebApiException ex)
@@ -10344,7 +10344,7 @@ namespace OpenTween
             {
                 try
                 {
-                    var task = this.twitterApi.FriendshipsDestroy(id);
+                    var task = this.twitterApi.FriendshipsDestroy(id).IgnoreResponse();
                     await dialog.WaitForAsync(this, task);
                 }
                 catch (WebApiException ex)