anvie / port-scanner

Simple port scanner library for Go
105 stars 20 forks source link

Added mutex lock to array modification #6

Closed ikkerens closed 6 years ago

ikkerens commented 6 years ago

When using any amount of threads higher than 1, the access to the rv int slice is unsafe and may cause loss of data, causing results previously inserted to be thrown away. By adding a mutex lock to the array modification, this problem is solved.