server: Don't call ngtcp2_conn_write_pkt during handshake
@@ -1362,7 +1362,8 @@ int Handler::on_write(bool retransmit) {
return rv;
}
}
- } else {
+ }
+
if (!ngtcp2_conn_get_handshake_completed(conn_)) {
rv = do_handshake(nullptr, 0);
if (rv == NETWORK_ERR_SEND_NON_FATAL) {
@@ -1389,7 +1390,6 @@ int Handler::on_write(bool retransmit) {
schedule_retransmit();
return 0;
}
- }
for (;;) {
auto n = ngtcp2_conn_write_pkt(conn_, sendbuf_.wpos(), max_pktlen_,
