fix: linear

This commit is contained in:
崔竞宁
2022-12-08 23:38:37 +08:00
parent 9fde45f6fd
commit 7d4accc441
3 changed files with 28 additions and 3 deletions

4
opt.go
View File

@@ -91,6 +91,10 @@ func (o *option) check() error {
o.fromDevice.check()
o.toDevice.check()
if o.fromDevice.linear || o.toDevice.linear {
o.fromDevice.threads = 1
o.toDevice.threads = 1
}
if o.logger == nil {
o.logger = logrus.StandardLogger()
}