Merge pull request #222 from ranjanashish/devel

fields in /proc/net/tcp* are not always delimited by single space
reviewable/pr18780/r1
James Cammarata 10 years ago
commit a53acf4431

@ -228,7 +228,7 @@ class LinuxTCPConnectionInfo(TCPConnectionInfo):
active_connections = 0
f = open(self.source_file[self.family])
for tcp_connection in f.readlines():
tcp_connection = tcp_connection.strip().split(' ')
tcp_connection = tcp_connection.strip().split()
if tcp_connection[self.local_address_field] == 'local_address':
continue
if tcp_connection[self.connection_state_field] not in self.connection_states:

Loading…
Cancel
Save