Raise an IOError if the socket has data on it before sending