Pct 697  agent running but down in pct

What does this code block do?  There's no code comment and it's not obvious, but it looks like it strips `:port` from the remote address?