Close RTMP socket before waiting on CreateConnectionThread