Use ola/network/SocketCloser.h here then you won't have to remember to call close() before returning