Fix osx for mq changes, this does not implement mq on osx (#395)
This commit is contained in:
parent
1bae5b2550
commit
ecfb40f29c
|
@ -130,7 +130,7 @@ func (f *Interface) run() {
|
||||||
go f.listenOut(i)
|
go f.listenOut(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch n queues to read packets from tun dev
|
// Prepare n tun queues
|
||||||
var reader io.ReadWriteCloser = f.inside
|
var reader io.ReadWriteCloser = f.inside
|
||||||
for i := 0; i < f.routines; i++ {
|
for i := 0; i < f.routines; i++ {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
@ -140,12 +140,16 @@ func (f *Interface) run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.readers[i] = reader
|
f.readers[i] = reader
|
||||||
go f.listenIn(reader, i)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := f.inside.Activate(); err != nil {
|
if err := f.inside.Activate(); err != nil {
|
||||||
l.Fatal(err)
|
l.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Launch n queues to read packets from tun dev
|
||||||
|
for i := 0; i < f.routines; i++ {
|
||||||
|
go f.listenIn(f.readers[i], i)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Interface) listenOut(i int) {
|
func (f *Interface) listenOut(i int) {
|
||||||
|
|
Loading…
Reference in New Issue