Join connection thread on disconnect.

Without joining the thread, an exception gets thrown when the interpreter shutsdown.