Skip to content

Commit b508a91

Browse files
committed
Relicensing grant: guyco3
I hereby agree to license my contributions to libzmq under the terms of the MPLv2.
1 parent 0c9b1ca commit b508a91

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int zmq::stream_t::xsend (msg_t *msg_)
116116
_current_out = NULL;
117117
return 0;
118118
}
119-
if (!_current_out->check_write()) {
119+
if (!_current_out->check_write ()) {
120120
_more_out = true;
121121
errno = EAGAIN;
122122
return -1;

tests/test_stream_hwm_disconnect.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ void test_stream_hwm_disconnect ()
2323
// Connect a raw TCP socket to the ZMQ_STREAM socket
2424
fd_t fd = connect_socket (endpoint);
2525

26-
// STREAM socket receives two frames on connection:
26+
// STREAM socket receives two frames on connection:
2727
// 1. The routing ID of the new peer
2828
zmq_msg_t routing_id;
2929
TEST_ASSERT_SUCCESS_ERRNO (zmq_msg_init (&routing_id));
3030
TEST_ASSERT_SUCCESS_ERRNO (zmq_msg_recv (&routing_id, stream, 0));
31-
31+
3232
// Store routing ID for later use in disconnection
3333
size_t id_size = zmq_msg_size (&routing_id);
3434
void *id_data = zmq_msg_data (&routing_id);
35-
35+
3636
// 2. An empty frame (connection notification)
3737
TEST_ASSERT_TRUE (zmq_msg_more (&routing_id));
3838
zmq_msg_t empty;
@@ -45,7 +45,8 @@ void test_stream_hwm_disconnect ()
4545
// In ZMQ_STREAM, we send [Routing ID][Data].
4646
while (true) {
4747
// Send Routing ID frame
48-
int rc = zmq_send (stream, id_data, id_size, ZMQ_DONTWAIT | ZMQ_SNDMORE);
48+
int rc =
49+
zmq_send (stream, id_data, id_size, ZMQ_DONTWAIT | ZMQ_SNDMORE);
4950
if (rc == -1)
5051
break;
5152

@@ -61,7 +62,7 @@ void test_stream_hwm_disconnect ()
6162
// Verify that we actually reached the HWM
6263
TEST_ASSERT_EQUAL_INT (EAGAIN, errno);
6364

64-
// TEST: Attempt to disconnect the client by sending the Routing ID
65+
// TEST: Attempt to disconnect the client by sending the Routing ID
6566
// followed by a 0-byte payload.
6667
// Before the fix, the first frame (Routing ID) would fail with EAGAIN.
6768
int rc = zmq_send (stream, id_data, id_size, ZMQ_DONTWAIT | ZMQ_SNDMORE);

0 commit comments

Comments
 (0)