diff --git a/streams.py b/streams.py index c0ff36d..b1dcc1c 100644 --- a/streams.py +++ b/streams.py @@ -78,8 +78,8 @@ class Stream(Base): host, _, port = self.uri.partition(':') # try to convert uri to host name host = short_hostname(host) - self.tags['stream'] = f'{host}:{port}' - print(self.uri, '=', self.tags['stream'], 'connected') + self.uri = self.tags['stream'] = f'{host}:{port}' + print(f'{host}:{port}', '=', self.uri, 'connected') self._buffer = [] self._deadline = INF self._next_connect = 0 @@ -284,7 +284,7 @@ class EventStream: continue device = stream.tags.get('device') events.append(('stream', kwargs.get('instrument', '0'), - {'device': device}, uri, int(time.time()))) + {'device': device}, stream.uri, int(time.time()))) for name, stream in self.streams.items(): try: if stream.get_events(events, maxevents):