diff options
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircsocket.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rbot/ircsocket.rb b/lib/rbot/ircsocket.rb index 6a5f281a..2f66835f 100644 --- a/lib/rbot/ircsocket.rb +++ b/lib/rbot/ircsocket.rb @@ -164,9 +164,11 @@ module Irc end def clearq - unless @sendq.empty? - @qmutex.synchronize do - @sendq.clear + if @sock + unless @sendq.empty? + @qmutex.synchronize do + @sendq.clear + end end end end |