Changeset View
Changeset View
Standalone View
Standalone View
support/aphlict/server/aphlict_server.js
| Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | for (var i = 0; i < listeners.length; i++) { | ||||
| try { | try { | ||||
| listener.writeMessage(msg); | listener.writeMessage(msg); | ||||
| ++messages_out; | ++messages_out; | ||||
| debug.log('<%s> Wrote Message', listener.getDescription()); | debug.log('<%s> Wrote Message', listener.getDescription()); | ||||
| } catch (error) { | } catch (error) { | ||||
| clients.removeListener(listener); | clients.removeListener(listener); | ||||
| debug.log('<%s> Write Error: %s', error); | debug.log('<%s> Write Error: %s', listener.getDescription(), error); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| // If we're configured to drop permissions, get rid of them now that we've | // If we're configured to drop permissions, get rid of them now that we've | ||||
| // bound to the ports we need and opened logfiles. | // bound to the ports we need and opened logfiles. | ||||
| if (config.user) { | if (config.user) { | ||||
| process.setuid(config.user); | process.setuid(config.user); | ||||
| } | } | ||||
| debug.log('Started Server (PID %d)', process.pid); | debug.log('Started Server (PID %d)', process.pid); | ||||