yetibot / core

:expressionless: Core yetibot utilities, extracted for shared use among Yetibot and its various plugins
https://yetibot.com
Eclipse Public License 1.0
27 stars 17 forks source link

Handle "Nick in use" notice in IRC adapter. #113

Closed sarg closed 4 years ago

sarg commented 4 years ago

irclj uses separate thread for connection. Whenever "nick in use" occurs it calls callback and then throws Exception which stops the thread. (https://github.com/Raynes/irclj/blob/f230935cd94dc1c86ffb6677c1b6bb8675d3df94/src/irclj/process.clj#L91)

So in order to recover this siutation I have to stop/start adapter.

codecov[bot] commented 4 years ago

Codecov Report

Merging #113 into master will increase coverage by <.01%. The diff coverage is 41.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   43.64%   43.64%   +<.01%     
==========================================
  Files          90       90              
  Lines        3590     3622      +32     
  Branches      166      166              
==========================================
+ Hits         1567     1581      +14     
- Misses       1857     1875      +18     
  Partials      166      166
Impacted Files Coverage Δ
src/yetibot/core/adapters/irc.clj 27.23% <41.46%> (+2.92%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9b79014...492c487. Read the comment docs.

sarg commented 4 years ago

Yeah, I also have no clue why that is happening. I was testing only the reconnection part though. I've amended commit with your suggestion.

devth commented 4 years ago

@sarg awesome, thanks!

sarg commented 4 years ago

I've pushed the fix