MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / proxy

Function proxy

public/javascripts/socket.io.js:6292–6307  ·  view source on GitHub ↗
(err, result)

Source from the content-addressed store, hash-verified

6290 return (count === 0) ? callback() : proxy
6291
6292 function proxy(err, result) {
6293 if (proxy.count <= 0) {
6294 throw new Error('after called too many times')
6295 }
6296 --proxy.count
6297
6298 // after first error, rest are passed to err_cb
6299 if (err) {
6300 bail = true
6301 callback(err)
6302 // future error callbacks will go to error handler
6303 callback = err_cb
6304 } else if (proxy.count === 0 && !bail) {
6305 callback(null, result)
6306 }
6307 }
6308 }
6309
6310 function noop() {}

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected