- Timestamp:
- 08/20/16 10:45:48 (8 years ago)
- Location:
- branches/thasling/DistributedGA/DistributedGA.Core/Implementation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
r14253 r14261 53 53 sender.Init(ownInstance, messageCacheCapacity); 54 54 55 } catch (Exception ex) { 55 } 56 catch (Exception ex) { 56 57 AddError("PeerNetworkMessageHandler.Init", ex); 57 58 } … … 63 64 sender.Dispose(); 64 65 peerListManager.Dispose(); 65 } catch (Exception ex) { 66 } 67 catch (Exception ex) { 66 68 AddError("PeerNetworkMessageHandler.Dispose", ex); 67 69 } … … 74 76 try { 75 77 sender.SendData(peer, data); 76 } catch (Exception ex) { 78 } 79 catch (Exception ex) { 77 80 AddError("PeerNetworkMessageHandler.PublishDataToNetwork(during sending to one peer!)", ex); 78 81 } 79 82 } 80 83 81 } catch (Exception ex) { 84 } 85 catch (Exception ex) { 82 86 AddError("PeerNetworkMessageHandler.PublishDataToNetwork", ex); 83 87 } … … 103 107 } 104 108 return res;//.ToArray(); 105 } catch (Exception ex) { 109 } 110 catch (Exception ex) { 106 111 AddError("PeerNetworkMessageHandler.GetDataFromNetwork", ex); 107 112 return null; … … 133 138 .Select(ip => ip.ToString()) 134 139 .First(str => str.StartsWith(ipPrefix)); 135 } catch { return null; } 140 } 141 catch { return null; } 136 142 } 137 143 … … 147 153 private void AddError(string source, Exception ex) { 148 154 PropagateException(ex); 149 if (peerListManager != null) {150 try {151 peerListManager.SendLogToServer(string.Concat("Source: ", source, ", Exception: ", ex.Message));152 } catch { }153 }154 155 } 156 155 157 } 156 158 } -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
r14253 r14261 76 76 77 77 Task.WaitAll(runningTasks.ToArray()); 78 } finally { 78 } 79 finally { 79 80 isActive = false; 80 81 } … … 129 130 } 130 131 } 131 } catch (Exception ex) { 132 } 133 catch (Exception ex) { 132 134 //ignore 133 135 Console.WriteLine(ex.Message); -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
r14253 r14261 41 41 public List<PeerInfo> GetPeerList() { 42 42 return cachedPeerList; 43 }44 45 public void SendLogToServer(string msg) {46 var binding = new NetTcpBinding();47 var endpoint = new EndpointAddress(serverString);48 using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) {49 using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) {50 ((IContactService)client).MakeLog(myself, msg);51 }52 }53 43 } 54 44
Note: See TracChangeset
for help on using the changeset viewer.