Gocnak / Botnak

A Java-based IRC chat client with focus on Twitch.tv streams.
https://gocnak.github.io/Botnak
MIT License
67 stars 28 forks source link

Resource and memory leak when clicking "Setup User Account" more than once #116

Closed AhiVT closed 9 years ago

AhiVT commented 9 years ago

The console will spew "Address currently in use" indefinitely until the process exhausts all memory. It also causes a ridiculous spike in CPU usage.

mikesmiffy128 commented 9 years ago

I think I know why that'd happen. When you set up the account, Botnak starts a server to capture information from the browser that gets launched. If you try and start the server twice, the socket is already in use and I guess Botnak goes into a loop retrying. The solution would be to not retry in the event of a failure, but handle the error gracefully somehow.

AhiVT commented 9 years ago

It also never terminates those servers from looking at my memory usage increase.

mikesmiffy128 commented 9 years ago

I'm sure it's supposed to exit the moment it gets a request. Maybe there's a bug causing it not to clean up properly.

Gocnak commented 9 years ago

Thank you, I will look into this and hopefully fix it for the next update.