5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 05:10:26 +00:00

Only replace call name with interface prefix when interface is set

This commit is contained in:
Neil Alexander 2018-09-25 18:05:57 +01:00
parent 3f8a4ab17d
commit 387ae9ea6c
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -112,7 +112,10 @@ func (iface *tcpInterface) listener() {
// This all happens in a separate goroutine that it spawns.
func (iface *tcpInterface) call(saddr string, socksaddr *string, sintf string) {
go func() {
callname := fmt.Sprintf("%s/%s", saddr, sintf)
callname := saddr
if sintf != "" {
callname = fmt.Sprintf("%s/%s", saddr, sintf)
}
quit := false
iface.mutex.Lock()
if _, isIn := iface.calls[callname]; isIn {