stopListening method

Stops the listening thread.

 Syntax