make TX timeout threadsafe