Closed gmaclennan closed 8 years ago
One part that seems a little off is: https://github.com/digidem/osm-p2p-server/blob/bba11ce97a4d5ffb2cf6b4c00daddaca04513c74/lib/routes.js#L109
If more than 1 of the ids in the ids array create an error, res.end() will double-fire and crash the process. Here's how I solved that issue in another spot with a sent boolean: https://github.com/digidem/osm-p2p-server/blob/bba11ce97a4d5ffb2cf6b4c00daddaca04513c74/lib/routes.js#L244
id
ids
res.end()
sent
One part that seems a little off is: https://github.com/digidem/osm-p2p-server/blob/bba11ce97a4d5ffb2cf6b4c00daddaca04513c74/lib/routes.js#L109
If more than 1 of the
id
s in theids
array create an error,res.end()
will double-fire and crash the process. Here's how I solved that issue in another spot with asent
boolean: https://github.com/digidem/osm-p2p-server/blob/bba11ce97a4d5ffb2cf6b4c00daddaca04513c74/lib/routes.js#L244