def on_close(self):
    'Called when a client connection is closed for any reason.'
    print('WebSocket closed', 'by user at {}'.format(self.request.remote_ip))
    print('close code: {}'.format(self.close_code))
    print('close reason: {!r}'.format(self.close_reason))
Called when a client connection is closed for any reason.
def on_close(self):
    
    print('WebSocket closed', 'by user at {}'.format(self.request.remote_ip))
    print('close code: {}'.format(self.close_code))
    print('close reason: {!r}'.format(self.close_reason))