@@ -312,7 +312,7 @@ func (disc *PluggableDiscovery) Run() (err error) {
312
312
return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "HELLO" , err )
313
313
} else if msg .EventType != "hello" {
314
314
return errors .Errorf (tr ("communication out of sync, expected 'hello', received '%s'" ), msg .EventType )
315
- } else if msg .Message != "OK" || msg .Error {
315
+ } else if strings . ToUpper ( msg .Message ) != "OK" || msg .Error {
316
316
return errors .Errorf (tr ("command failed: %s" ), msg .Message )
317
317
} else if msg .ProtocolVersion > 1 {
318
318
return errors .Errorf (tr ("protocol version not supported: requested 1, got %d" ), msg .ProtocolVersion )
@@ -333,7 +333,7 @@ func (disc *PluggableDiscovery) Start() error {
333
333
return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "START" , err )
334
334
} else if msg .EventType != "start" {
335
335
return errors .Errorf (tr ("communication out of sync, expected 'start', received '%s'" ), msg .EventType )
336
- } else if msg .Message != "OK" || msg .Error {
336
+ } else if strings . ToUpper ( msg .Message ) != "OK" || msg .Error {
337
337
return errors .Errorf (tr ("command failed: %s" ), msg .Message )
338
338
}
339
339
disc .statusMutex .Lock ()
@@ -353,7 +353,7 @@ func (disc *PluggableDiscovery) Stop() error {
353
353
return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "STOP" , err )
354
354
} else if msg .EventType != "stop" {
355
355
return errors .Errorf (tr ("communication out of sync, expected 'stop', received '%s'" ), msg .EventType )
356
- } else if msg .Message != "OK" || msg .Error {
356
+ } else if strings . ToUpper ( msg .Message ) != "OK" || msg .Error {
357
357
return errors .Errorf (tr ("command failed: %s" ), msg .Message )
358
358
}
359
359
disc .statusMutex .Lock ()
@@ -376,7 +376,7 @@ func (disc *PluggableDiscovery) Quit() error {
376
376
return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "QUIT" , err )
377
377
} else if msg .EventType != "quit" {
378
378
return errors .Errorf (tr ("communication out of sync, expected 'quit', received '%s'" ), msg .EventType )
379
- } else if msg .Message != "OK" || msg .Error {
379
+ } else if strings . ToUpper ( msg .Message ) != "OK" || msg .Error {
380
380
return errors .Errorf (tr ("command failed: %s" ), msg .Message )
381
381
}
382
382
disc .killProcess ()
@@ -416,7 +416,7 @@ func (disc *PluggableDiscovery) StartSync(size int) (<-chan *Event, error) {
416
416
return nil , fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "START_SYNC" , err )
417
417
} else if msg .EventType != "start_sync" {
418
418
return nil , errors .Errorf (tr ("communication out of sync, expected 'start_sync', received '%s'" ), msg .EventType )
419
- } else if msg .Message != "OK" || msg .Error {
419
+ } else if strings . ToUpper ( msg .Message ) != "OK" || msg .Error {
420
420
return nil , errors .Errorf (tr ("command failed: %s" ), msg .Message )
421
421
}
422
422
0 commit comments