Что означает & ldquo; сброс соединения peer & rdquo; имею в виду?

Вам лучше делать ...

<form onsubmit="return isValidForm()" />

Если isValidForm() возвращает false, ваша форма не отправляется.

Вы также должны двигаться ваш обработчик событий из встроенного.

document.getElementById('my-form').onsubmit = function() {
    return isValidForm();
};
570
задан amarnath 28 April 2017 в 09:58
поделиться

3 ответа

It's fatal. The remote server has sent you a RST packet, which indicates an immediate dropping of the connection, rather than the usual handshake. This bypasses the normal half-closed state transition. I like this description:

"Connection reset by peer" is the TCP/IP equivalent of slamming the phone back on the hook. It's more polite than merely not replying, leaving one hanging. But it's not the FIN-ACK expected of the truly polite TCP/IP converseur.

720
ответ дан 22 November 2019 в 22:02
поделиться

Я анализирую cooljugator.com через язык Движения goroutines (для изучения/приобретения опыт с goroutines & посмотрите то, что бросает вызов, я мог столкнуться в реальном проекте), и теперь получение этой ошибки. Я могу понять, что открытие слишком многих ссылок HTTP заставляет удаленный сервер закрывать соединение. Я думаю, существует такая конфигурация на их сервере, чтобы не анализировать их данные ботами. Помещение задержки (например, 10 секунд) в открытии многих goroutines не вызывает эту ошибку.

1
ответ дан 22 November 2019 в 22:02
поделиться

This means that a TCP RST was received and the connection is now closed. This occurs when a packet is sent from your end of the connection but the other end does not recognize the connection; it will send back a packet with the RST bit set in order to forcibly close the connection.

This can happen if the other side crashes and then comes back up or if it calls close() on the socket while there is data from you in transit, and is an indication to you that some of the data that you previously sent may not have been received.

It is up to you whether that is an error; if the information you were sending was only for the benefit of the remote client then it may not matter that any final data may have been lost. However you should close the socket and free up any other resources associated with the connection.

182
ответ дан 22 November 2019 в 22:02
поделиться