Skip to content

Commit 8294c01

Browse files
committed
Bug fixes
1 parent f414c12 commit 8294c01

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

app/reducers/eon_list_reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default function eonListReducer(state = initialState, action) {
9898
...state.eons,
9999
[action.payload.id]: {
100100
...state.eons[action.payload.id],
101-
reachable: 0,
101+
// reachable: 0,
102102
pinging: true
103103
}
104104
}

app/sagas/network_scanner_sagas.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,14 @@ function pingEon(eon) {
156156
// console.warn("Pinging EON",eon);
157157
return new Promise((resolve,reject) => {
158158
try {
159-
var session = ping.createSession();
159+
var session = ping.createSession({
160+
networkProtocol: ping.NetworkProtocol.IPv4,
161+
packetSize: 16,
162+
retries: 1,
163+
sessionId: (process.pid % 65535),
164+
timeout: 5000,
165+
ttl: 128
166+
});
160167

161168
session.pingHost(eon.ip, function pingEon(error, target) {
162169
if (error) {
@@ -198,7 +205,11 @@ function* pingEons() {
198205
const { foundCount } = networkScanner;
199206
const { eons, unresolvedEons } = eonList;
200207
let eonKeys = Object.keys(eons);
201-
// rpc.emit('notify',{title: 'Workbench finished scanning!',body: `Found ${foundCount} EON on the network.`});
208+
try {
209+
rpc.emit('notify',{title: 'Workbench finished scanning!',body: `Found ${foundCount} EON on the network.`});
210+
} catch (e) {
211+
console.warn("Cannot send notification right now...");
212+
}
202213
// console.warn("Pinging EONS:",eonKeys);
203214
yield all(eonKeys.map(function * (key) {
204215
const eon = eons[key];

0 commit comments

Comments
 (0)