Resolve thread safety in TCP BTL

Based on patch provided by George