mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
more lint driven refactoring
This commit is contained in:
parent
7919cda5ec
commit
0de6f3a76e
57 changed files with 168 additions and 241 deletions
|
@ -65,7 +65,7 @@ func NewQueue(iface *network.Endpoint) (q *Queue, err error) {
|
|||
pktCb: nil,
|
||||
}
|
||||
|
||||
if q.active == true {
|
||||
if q.active {
|
||||
if q.handle, err = pcap.OpenLive(iface.Name(), 1024, true, pcap.BlockForever); err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ func (q *Queue) Stop() {
|
|||
q.Lock()
|
||||
defer q.Unlock()
|
||||
|
||||
if q.active == true {
|
||||
if q.active {
|
||||
// wait for write operations to be completed
|
||||
q.writes.Wait()
|
||||
// signal the main loop to exit and close the handle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue