Skip to content

Pass -q flag to netcat to quit post EOF on stdin

Administrator requested to merge doctor/redis-check into main

Created by: scalabilitysolved

The sg doctor health check pings Redis to see if it is up and running using netcat. On Ubuntu 20.04.2 LTS I was finding that netcat would just hang upon executing the health check of echo "PING" | nc localhost 6379.

This small change passes in the -q0 flag so that it shuts once the response has been written as per the man page: after EOF on stdin, wait the specified number of seconds and then quit. If seconds is negative, wait forever.

Merge request reports

Loading