@@ -312,7 +312,7 @@ func (disc *PluggableDiscovery) Run() (err error) {
312312 return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "HELLO" , err )
313313 } else if msg .EventType != "hello" {
314314 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 {
316316 return errors .Errorf (tr ("command failed: %s" ), msg .Message )
317317 } else if msg .ProtocolVersion > 1 {
318318 return errors .Errorf (tr ("protocol version not supported: requested 1, got %d" ), msg .ProtocolVersion )
@@ -333,7 +333,7 @@ func (disc *PluggableDiscovery) Start() error {
333333 return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "START" , err )
334334 } else if msg .EventType != "start" {
335335 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 {
337337 return errors .Errorf (tr ("command failed: %s" ), msg .Message )
338338 }
339339 disc .statusMutex .Lock ()
@@ -353,7 +353,7 @@ func (disc *PluggableDiscovery) Stop() error {
353353 return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "STOP" , err )
354354 } else if msg .EventType != "stop" {
355355 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 {
357357 return errors .Errorf (tr ("command failed: %s" ), msg .Message )
358358 }
359359 disc .statusMutex .Lock ()
@@ -376,7 +376,7 @@ func (disc *PluggableDiscovery) Quit() error {
376376 return fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "QUIT" , err )
377377 } else if msg .EventType != "quit" {
378378 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 {
380380 return errors .Errorf (tr ("command failed: %s" ), msg .Message )
381381 }
382382 disc .killProcess ()
@@ -416,7 +416,7 @@ func (disc *PluggableDiscovery) StartSync(size int) (<-chan *Event, error) {
416416 return nil , fmt .Errorf (tr ("calling %[1]s: %[2]w" ), "START_SYNC" , err )
417417 } else if msg .EventType != "start_sync" {
418418 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 {
420420 return nil , errors .Errorf (tr ("command failed: %s" ), msg .Message )
421421 }
422422
0 commit comments