CaliDog/certstream-java

Stream ends after 1 min

Closed this issue · 4 comments

Hey there! I really love this project and the possibilities it does offer. Sadly recently it did somehow break. When I use the following as a test code:

public static void main(String[] args){
        CertStream.onMessageString(msg -> {
        	JSONArray jsonArray =  new JSONObject(msg).getJSONObject("data").getJSONObject("leaf_cert").getJSONArray("all_domains");
        	for(Object domain : jsonArray) {
        		System.out.println(domain.toString());        			
        	}
        });    	
}

The stream / program does just stop after about 1 minute or 7k - 8k domains.

Is there something I do wrong? Or did something else change? Thank you!

Ah Sorry. I found the answer on the other projects. As temp fix I'll run a cron every minute.

@Schneidertm I didn’t know about this limit (I assume @Fitblip put something in place?) could you link me to where you found this answer?

Correct. Oh yeah sorry I forgot to link them, here they are:

CaliDog/certstream-python#27
CaliDog/certstream-go#8

and
ninenines/cowboy#1259

Just to close the loop here, we need to send an occasional ping from the clients to ensure the server doesn't assume they're dead. I originally just had the timeout set to something really high but that (understandably) causes issues on the public server.