This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ZongJi = require('zongji'); | |
var RETRY_TIMEOUT = 4000; | |
function zongjiManager(dsn, options, onBinlog) { | |
var newInst = new ZongJi(dsn, options); | |
newInst.on('error', function(reason) { | |
newInst.removeListener('binlog', onBinlog); | |
setTimeout(function() { | |
// If multiple errors happened, a new instance may have already been created |