public synchronized void sendRetry ( long retry , EventCallback callback ) { if ( open == 0 || shutdown ) { if ( callback != null ) { callback . failed ( this , null , null , null , new ClosedChannelException ( ) ) ; } return ; } queue . add ( new SSEData ( retry , callback ) ) ; sink . getIoThread ( ) . execute ( new Runnable ( ) { @ Override public void run ( ) { synchronized ( ServerSentEventConnection . this ) { if ( pooled == null ) { fillBuffer ( ) ; writeListener . handleEvent ( sink ) ; } } } } ) ; }
Sends the retry message to the client instructing it how long to wait before attempting a reconnect .