Update functional tests

Make sure we return nil if there was a problem reading from socket

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>