Skip to content

Commit

Permalink
bugfix: fix kill_process by localPort process not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zousheng committed May 27, 2020
1 parent 8cacba3 commit a811aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion channel/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (l *LocalChannel) GetPidsByLocalPort(localPort string) ([]string, error) {
//$ss -lpn 'sport = :80'
//Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
//tcp LISTEN 0 128 *:80 *:* users:(("tengine",pid=237768,fd=6),("tengine",pid=237767,fd=6))
response := l.Run(context.TODO(), "ss", fmt.Sprintf("-pn sport = %s", localPort))
response := l.Run(context.TODO(), "ss", fmt.Sprintf("-pln sport = %s", localPort))
if !response.Success {
return []string{}, fmt.Errorf(response.Err)
}
Expand Down

0 comments on commit a811aa7

Please sign in to comment.