susidns, addressbook: Don't attempt to fetch subscriptions if

HTTP proxy is down (ticket #1530)
This commit is contained in:
zzz
2015-05-30 13:53:56 +00:00
parent 89745f5002
commit 280fc05c91
2 changed files with 8 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ import java.util.Collections;
import java.util.List;
import net.i2p.data.DataHelper;
import net.i2p.util.PortMapper;
import net.i2p.util.SecureFileOutputStream;
public class SubscriptionsBean extends BaseBean
@@ -136,7 +137,8 @@ public class SubscriptionsBean extends BaseBean
// with the correct parameters will kick off a
// config reload and fetch.
*******/
if (content != null && content.length() > 2) {
if (content != null && content.length() > 2 &&
_context.portMapper().getPort(PortMapper.SVC_HTTP_PROXY) > 0) {
message = _("Subscriptions saved, updating addressbook from subscription sources now.");
// + "<img height=\"1\" width=\"1\" alt=\"\" " +
// "src=\"/addressbook/?wakeup=1&nonce=" + nonce + "\">";