This commit is contained in:
ryan
2026-06-16 09:20:18 +08:00
parent bfa00ae6ac
commit c6df73e522
17 changed files with 183 additions and 25 deletions
+3 -2
View File
@@ -11,7 +11,8 @@ import (
"fmt"
"net/http"
"strings"
"time"
"github.com/Rain-kl/Wavelet/pkg/httppool"
)
func init() {
@@ -131,7 +132,7 @@ func (p *TelegramPusher) sendMessage(ctx context.Context, baseURL, token, chatID
}
httpReq.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 10 * time.Second}
client := httppool.NewClient(defaultHTTPClientTimeout)
resp, err := client.Do(httpReq)
if err != nil {
return fmt.Errorf("http request failed: %w", err)