changed socket.close() to socket.disconnect() (since close doesn't exist).  tried to fix the progress-bar, kinda.