GUAC-769: Ensure socket output is handled in a threadsafe manner.