here I have a segmentation fault:-( probably in ListenerThread::run() after checking for 'q', also i need to kill thread properly, so that it closes his connection