@@ -65,6 +65,7 @@ func OptionVerifySSL(verify bool) clientOption {
65
65
func OptionConnectionTimeout (d time.Duration ) clientOption {
66
66
return func (ic * ImmichClient ) error {
67
67
ic .client .Timeout = d
68
+ ic .client .Transport .(* http.Transport ).ResponseHeaderTimeout = d
68
69
return nil
69
70
}
70
71
}
@@ -99,11 +100,11 @@ func NewImmichClient(endPoint string, key string, options ...clientOption) (*Imm
99
100
MaxIdleConnsPerHost : 100 ,
100
101
MaxConnsPerHost : 100 ,
101
102
Dial : (& net.Dialer {
102
- Timeout : 10 * time .Second ,
103
+ Timeout : 30 * time .Second ,
103
104
KeepAlive : 30 * time .Second ,
104
105
}).Dial ,
105
- TLSHandshakeTimeout : 10 * time .Second ,
106
- ResponseHeaderTimeout : 10 * time .Second ,
106
+ TLSHandshakeTimeout : 30 * time .Second ,
107
+ ResponseHeaderTimeout : 20 * time .Minute ,
107
108
},
108
109
key : key ,
109
110
DeviceUUID : deviceUUID ,
@@ -112,7 +113,7 @@ func NewImmichClient(endPoint string, key string, options ...clientOption) (*Imm
112
113
}
113
114
114
115
ic .client = & http.Client {
115
- Timeout : time .Second * 60 ,
116
+ Timeout : time .Minute * 20 ,
116
117
Transport : ic .roundTripper ,
117
118
}
118
119
0 commit comments