def on_close(self, ws):
log.debug("<STR_LIT>".format(self.url))<EOL>if self.keepalive and self.keepalive.is_alive():<EOL><INDENT>self.keepalive.do_run = False<EOL>self.keepalive.join()<EOL><DEDENT>
Called when websocket connection is closed