'Stop the client.
Parameters
timeout : float
Timeout after which to give up if the client cannot be cleanly
shut down.'

def stop(self, timeout=10.0):

    self._is_running = False
    if (self._callable and self._thread.is_alive()):
        self._thread.join(timeout)
    if self._thread.is_alive():
        raise SAMPClientError(u'Client    was    not    shut    down    successfully    (timeout={0}s)'.format(timeout))
