mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-05 09:21:40 -05:00
That's now working
This commit is contained in:
parent
8f7eca8a30
commit
97a70e6d45
1 changed files with 5 additions and 5 deletions
10
main.js
10
main.js
|
@ -139,7 +139,7 @@ function imDead(why, e = '') {
|
||||||
socket.emit('change', {
|
socket.emit('change', {
|
||||||
type: 'startStop',
|
type: 'startStop',
|
||||||
change: {
|
change: {
|
||||||
running: 1,
|
running: 1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (restart) {
|
if (restart) {
|
||||||
|
@ -158,8 +158,8 @@ function imDead(why, e = '') {
|
||||||
function criticalProblem(err, e, handler, ...args) {
|
function criticalProblem(err, e, handler, ...args) {
|
||||||
if (!mustBe) {
|
if (!mustBe) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
status.running = 2
|
status.running = 2;
|
||||||
status.error = err
|
status.error = err;
|
||||||
logger.log(importance[3], 'Critical Problem: ' + errors[err] + '\n' + e);
|
logger.log(importance[3], 'Critical Problem: ' + errors[err] + '\n' + e);
|
||||||
socket.emit('change', {
|
socket.emit('change', {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
@ -175,7 +175,7 @@ function criticalProblem(err, e, handler, ...args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDisc(info) {
|
function handleDisc(info) {
|
||||||
let [host, port] = info
|
let [host, port] = info;
|
||||||
isReachable(host, port, is => {
|
isReachable(host, port, is => {
|
||||||
if (is) {
|
if (is) {
|
||||||
spawn();
|
spawn();
|
||||||
|
@ -221,7 +221,7 @@ var commandHandlers = function commandHandlers(command, cb) {
|
||||||
if (status.running === 0) {
|
if (status.running === 0) {
|
||||||
logger.log(importance[1], "Stop Command!");
|
logger.log(importance[1], "Stop Command!");
|
||||||
mustBe = true;
|
mustBe = true;
|
||||||
stopFFMPEG();
|
cmd.kill();
|
||||||
socket.emit('data', {
|
socket.emit('data', {
|
||||||
type: 'message',
|
type: 'message',
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue