Regarding this problem of ghost threads, there is no direct way apart from restarting the dispatcher.
Basically, when client gets disconnected the associated server thread will be terminated/closed. But in some cases when there is abnormal client shutdown, there might be possibility for having ghost threads left over.
Killing such threads manually (e.g. with Process explorer) may lead your application in inconsistent state. So we recommend to restart the dispatcher in these situations.