Solved problem with interrupting TCP client