Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 2440401

Browse files
author
Joshua T Corbin
committed
WIP
1 parent f06794a commit 2440401

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

service-proxy.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,24 +732,53 @@ function connectSinglePeer(hostPort, connectInfo) {
732732
var self = this;
733733

734734
if (self.peersToPrune[hostPort]) {
735+
736+
self.logger.info('SKIPPING PEER CONNECTION: PRUNED', self.extendLogInfo({
737+
hostPort: hostPort,
738+
connectInfo: connectInfo
739+
}));
740+
735741
return;
736742
}
737743

738744
var serviceName = connectInfo.serviceName;
739745
var serviceChannel = self.getServiceChannel(serviceName);
740746
if (!serviceChannel) {
747+
748+
self.logger.info('SKIPPING PEER CONNECTION: NO SERVICE CHANNEL', self.extendLogInfo({
749+
hostPort: hostPort,
750+
connectInfo: connectInfo
751+
}));
752+
741753
return;
742754
}
743755

744756
var peer = serviceChannel.peers.get(hostPort);
745757
if (!peer) {
758+
759+
self.logger.info('SKIPPING PEER CONNECTION: NO PEER', self.extendLogInfo({
760+
hostPort: hostPort,
761+
connectInfo: connectInfo
762+
}));
763+
746764
return;
747765
}
748766

749767
if (peer.draining) {
768+
769+
self.logger.info('SKIPPING PEER CONNECTION: PEER DRAINING', self.extendLogInfo({
770+
hostPort: hostPort,
771+
connectInfo: connectInfo
772+
}));
773+
750774
return;
751775
}
752776

777+
self.logger.info('CONNECTING TO PEER', self.extendLogInfo({
778+
hostPort: hostPort,
779+
connectInfo: connectInfo
780+
}));
781+
753782
peer.connectTo();
754783
};
755784

0 commit comments

Comments
 (0)