Skip to content

Commit b2b2542

Browse files
committed
Changed default subscribe timeout to 5 minutes.
1 parent d19fb7e commit b2b2542

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rpc/base_client.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* *
1313
* hprose rpc base client for Go. *
1414
* *
15-
* LastModified: May 22, 2017 *
15+
* LastModified: Aug 20, 2017 *
1616
* Author: Ma Bingyao <[email protected]> *
1717
* *
1818
\**********************************************************/
@@ -903,6 +903,9 @@ func (client *BaseClient) Subscribe(
903903
if settings == nil {
904904
settings = new(InvokeSettings)
905905
}
906+
if settings.Timeout <= 0 {
907+
settings.Timeout = 5 * time.Minute;
908+
}
906909
settings.ByRef = false
907910
settings.Idempotent = true
908911
settings.Mode = Normal

0 commit comments

Comments
 (0)