File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,9 @@ ZongJi.prototype.start = function (options = {}) {
193
193
this . _filters ( options ) ;
194
194
195
195
const testChecksum = ( resolve , reject ) => {
196
+ if ( this . stopped ) {
197
+ resolve ( ) ;
198
+ }
196
199
this . _isChecksumEnabled ( ( err , checksumEnabled ) => {
197
200
if ( err ) {
198
201
reject ( err ) ;
@@ -204,6 +207,9 @@ ZongJi.prototype.start = function (options = {}) {
204
207
} ;
205
208
206
209
const findBinlogEnd = ( resolve , reject ) => {
210
+ if ( this . stopped ) {
211
+ resolve ( ) ;
212
+ }
207
213
this . _findBinlogEnd ( ( err , result ) => {
208
214
if ( err ) {
209
215
return reject ( err ) ;
@@ -279,7 +285,7 @@ ZongJi.prototype.stop = function () {
279
285
this . stopped = true ;
280
286
// Binary log connection does not end with destroy()
281
287
this . connection . destroy ( ) ;
282
- this . ctrlConnection . query ( 'KILL ' + this . connection . threadId , ( ) => {
288
+ this . ctrlConnection . query ( 'KILL ' + this . connection . threadId , ( err , result ) => {
283
289
if ( this . ctrlConnectionOwner ) {
284
290
this . ctrlConnection . destroy ( ) ;
285
291
}
You can’t perform that action at this time.
0 commit comments