Skip to content

Commit

Permalink
Fix the byte count of the relay server
Browse files Browse the repository at this point in the history
  • Loading branch information
acfloria committed Sep 23, 2019
1 parent 076a81c commit f070ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def on_receive(self, fd, events):
(data, source_ip_port) = self.__sock.recvfrom(4096)

self.__message_counter += 1
self.__bytes_counter += sys.getsizeof(data)
self.__bytes_counter += sys.getsizeof(data) - 37
if (self.__message_counter % 1000 == 0):
LOGGER.warn('Received LTE data #{0}, rate: {1} kB/s'.format(self.__message_counter, self.__bytes_counter / (1000.0 * (time.clock() - self.__last_time))))
self.__last_time = time.clock()
Expand Down

0 comments on commit f070ee7

Please sign in to comment.