firebase / firebase/firebase-admin-java

Not meaningful timeout default values leading to hanging requests

未關閉
#901 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
needs-triage
主要語言
Java
星號
620
分支
305
平均合併
3 小時 23 分鐘
30 天內合併 PR
1

描述

### [REQUIRED] Step 2: Describe your environment

* Operating System version: MacOS Sonoma 14.1.1
* Firebase SDK version: v9.2.0
* Library version: _____
* Firebase Product: Firebase Cloud Messaging

### [REQUIRED] Step 3: Describe the problem
Sometimes the Google Server do not respond (like described in #850 ). However, the default values to read timeout and connect timeout are "0" because they are default initialized with 0 in the FirebaseOptions. So these requests hang for infinite time.

#### Steps to reproduce:
Send a message via FCM and the SDK. If Google does not respond, there is not timeout.

#### Fix:
Provide meaningful default values like 20s. This is the default in the Google HTTP Client (com.google.api.client.http.HttpRequest#readTimeout).

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 FirebaseOptions 如何初始化 Firebase Cloud Messaging 請求使用的讀取逾時和連線逾時值,並將其與 Google HTTP Client 的預設值進行比較。完成標準是:當 Google 沒有回應時,請求不再無限期掛起,且測試涵蓋所選的預設逾時行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
networking
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。