mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-12 17:12:46 +00:00
Merge pull request #4246 from YunYe-Pu/yunye-patch-wss
Problem: WSS broken under high load
This commit is contained in:
commit
80fef55955
15
RELICENSE/yunye-pu.md
Normal file
15
RELICENSE/yunye-pu.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Permission to Relicense under MPLv2 or any other share-alike OSI approved license chosen by the current ZeroMQ BDFL
|
||||
|
||||
This is a statement by Yunye Pu
|
||||
that grants permission to relicense its copyrights in the libzmq C++
|
||||
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
|
||||
share-alike Open Source Initiative approved license chosen by the current
|
||||
ZeroMQ BDFL (Benevolent Dictator for Life).
|
||||
|
||||
A portion of the commits made by the Github handle "Yunye-Pu", with
|
||||
commit author "Yunye Pu <yunye.pu.4743@gmail.com>", are copyright of Yunye Pu.
|
||||
This document hereby grants the libzmq project team to relicense libzmq,
|
||||
including all past, present and future contributions of the author listed above.
|
||||
|
||||
Yunye Pu
|
||||
2021/08/31
|
@ -194,6 +194,11 @@ int zmq::wss_engine_t::read (void *data_, size_t size_)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
errno = EPIPE;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc < 0) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
@ -207,14 +212,8 @@ int zmq::wss_engine_t::write (const void *data_, size_t size_)
|
||||
{
|
||||
ssize_t rc = gnutls_record_send (_tls_session, data_, size_);
|
||||
|
||||
if (rc == GNUTLS_E_INTERRUPTED) {
|
||||
errno = EINTR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc == GNUTLS_E_AGAIN) {
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
if (rc == GNUTLS_E_INTERRUPTED || rc == GNUTLS_E_AGAIN) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rc < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user