cossacklabs / acra

Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.
https://www.cossacklabs.com/acra/
Apache License 2.0
1.32k stars 128 forks source link

Fixed panic with signals #707

Closed Zhaars closed 1 week ago

Zhaars commented 1 week ago

There is a panic with closing closed channels come from functions StopListeners and Exit. It happens because signals are processed asynchronously and corresponded function can be called several times which triggers the panic. As a solution was used sync.Once to make it callable only once.

Checklist