Closes socket on no data, uses TCP_NODELAY, fix a tiny issue