@@ -138,12 +138,12 @@ public JPushClient(String masterSecret, String appKey, int maxRetryTimes, HttpPr
138138 public JPushClient (String masterSecret , String appKey , int maxRetryTimes , HttpProxy proxy , ClientConfig conf ,
139139 boolean apnsProduction , long timeToLive ) {
140140 conf .setMaxRetryTimes (maxRetryTimes );
141+ conf .setApnsProduction (apnsProduction );
142+ conf .setTimeToLive (timeToLive );
141143 _pushClient = new PushClient (masterSecret , appKey , proxy , conf );
142144 _reportClient = new ReportClient (masterSecret , appKey , proxy , conf );
143145 _deviceClient = new DeviceClient (masterSecret , appKey , proxy , conf );
144146 _scheduleClient = new ScheduleClient (masterSecret , appKey , proxy , conf );
145- _pushClient .setDefaults (apnsProduction , timeToLive );
146-
147147 }
148148
149149 /**
@@ -159,7 +159,10 @@ public JPushClient(String masterSecret, String appKey, int maxRetryTimes, HttpPr
159159 */
160160 @ Deprecated
161161 public JPushClient (String masterSecret , String appKey , boolean apnsProduction , long timeToLive ) {
162- _pushClient = new PushClient (masterSecret , appKey , apnsProduction , timeToLive );
162+ ClientConfig conf = ClientConfig .getInstance ();
163+ conf .setApnsProduction (apnsProduction );
164+ conf .setTimeToLive (timeToLive );
165+ _pushClient = new PushClient (masterSecret , appKey );
163166 _reportClient = new ReportClient (masterSecret , appKey );
164167 _deviceClient = new DeviceClient (masterSecret , appKey );
165168 _scheduleClient = new ScheduleClient (masterSecret , appKey );
0 commit comments