mirror of
				https://github.com/proxiodev/RedisBungee.git
				synced 2025-10-31 07:48:02 +00:00 
			
		
		
		
	Merge pull request #36 from Moehritz/fix
fix automatic pubsub reconnect in case of network issues
This commit is contained in:
		
						commit
						3a1362fd7a
					
				| @ -518,7 +518,14 @@ public final class RedisBungee extends Plugin { | ||||
|                     // FIXME: Extremely ugly hack | ||||
|                     // Attempt to unsubscribe this instance and try again. | ||||
|                     getLogger().log(Level.INFO, "PubSub error, attempting to recover.", e); | ||||
|                     jpsh.unsubscribe(); | ||||
|                     try { | ||||
|                         jpsh.unsubscribe(); | ||||
|                     } catch (Exception e1) { | ||||
|                         /* This may fail with | ||||
|                         - java.net.SocketException: Broken pipe | ||||
|                         - redis.clients.jedis.exceptions.JedisConnectionException: JedisPubSub was not subscribed to a Jedis instance | ||||
|                         */ | ||||
|                     } | ||||
|                     broken = true; | ||||
|                 } | ||||
|             } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Tux
						Tux