Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
encode.updates({mainLayer: that.mainLayer, changes: that.changes})
decode.adds(function (req, cb) {
log.add(req.links, req.value, req.options, function (err, result) {
encode.adds({
id: req.id,
error: err && err.message,
notFound: err && err.notFound,
value: result
})
})
cb()
})
if (sock.unref) sock.unref()
multileveldown.server(db, {encode: encode, decode: decode})
pump(sock, stream, sock)
})
var server = net.createServer((sock) => {
sock.on('error', () => {
sock.destroy()
})
sock.pipe(multileveldown.server(db)).pipe(sock)
})
var server = net.createServer(function (sock) {
if (sock.unref) sock.unref()
sockets.push(sock)
pump(sock, multileveldown.server(db), sock, function () {
sockets.splice(sockets.indexOf(sock), 1)
})
})