ByteBuffer buf = buffers[i];
payload[i] = buf.slice();
}
if (session.executeInIoThread) {
handler.onPingFrame(session, payload);
session.sendPong(buffers, new SendCallback() {
@Override
public void onCompletion() {
free0();
}
@Override
public void onError(Throwable cause) {
free0();
}
});
session.getChannel().resumeReceives();
} else {
session.getFrameHandlerExecutor().execute(new Runnable() {
@Override
public void run() {
handler.onPingFrame(session, payload);
session.sendPong(buffers, new SendCallback() {
@Override
public void onCompletion() {
free0();
}