mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-19 05:38:35 +02:00
Update with the new share handling system.
This commit is contained in:
+2
-3
@@ -24,7 +24,7 @@ app.use(function(req, res, next){
|
||||
|
||||
// Master/Slave communication Handling
|
||||
function messageHandler(message) {
|
||||
shareData.push(message.data);
|
||||
shareData.push(message);
|
||||
}
|
||||
|
||||
process.on('message', messageHandler);
|
||||
@@ -38,8 +38,7 @@ app.post('/leafApi', function (req, res) {
|
||||
switch (msgData.msgType) {
|
||||
case global.protos.MESSAGETYPE.SHARE:
|
||||
try {
|
||||
global.protos.Share.decode(msgData.msg);
|
||||
process.send({block: msgData.exInt, data: msgData.msg});
|
||||
process.send(global.protos.Share.decode(msgData.msg));
|
||||
} catch (e){
|
||||
}
|
||||
return res.json({'success': true});
|
||||
|
||||
Reference in New Issue
Block a user