summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/satserver/util/IrcClient.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/IrcClient.java b/src/main/java/org/openslx/satserver/util/IrcClient.java
index f7b6632..423c7c7 100644
--- a/src/main/java/org/openslx/satserver/util/IrcClient.java
+++ b/src/main/java/org/openslx/satserver/util/IrcClient.java
@@ -118,12 +118,17 @@ public class IrcClient
synchronized ( wrapper ) {
if ( !wrapper.connection.isConnected() ) {
try {
+ wrapper.channels.clear();
wrapper.connection.connect();
} catch ( KeyManagementException | NoSuchAlgorithmException | IOException e ) {
LOGGER.warn( "Cannot connect to " + host + " port " + port + " SSL: " + ssl, e );
outErrors.add( "Cannot connect to " + host + " port " + port + " SSL: " + ssl );
return;
}
+ try {
+ Thread.sleep( 5000 );
+ } catch ( InterruptedException e ) {
+ }
}
if ( wrapper.connection.isConnected() ) {
wrapper.sendMessage( channel, message );
@@ -156,6 +161,7 @@ public class IrcClient
{
try {
if ( !channels.contains( channel.toLowerCase() ) ) {
+ LOGGER.info( "Joining " + channel );
connection.doJoin( channel );
}
connection.doPrivmsg( channel, message );