| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
By default the RabbitMQ broker sets a tunable timeout of 10 seconds
from socket-open to successful handshake. This introduces a similar
login timeout on the client side. If the login does not complete within
this timeout, amqp_login and friends will return AMQP_STATUS_TIMEOUT and
the connection will be considered dead.
Two new functions amqp_set_handshake_timeout and
amqp_get_handshake_timeout are introduced to tune this behavior.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Check bounds on channel_max, frame_max, and heartbeat arguments to
amqp_login* functions.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use amqp_cstring_bytes to construct string instead of doing it manually
as this is error-prone.
|
|
|
|
|
| |
The current check was not clear in terms of readability, additionally it
confused scan-build.
|
|
|
|
|
|
|
|
| |
If a heartbeat timeout occurs skip calling SSL_shutdown as it involves doing a
send() which will likely hang. Additionally don't wait for a response when doing
an SSL_shutdown, as the underlying transport will not be reused.
Fixes #313
|
|
|
|
| |
condition always false (forgotten parenthesis)
|
|
|
|
|
| |
Don't initialize local variable last_error because it is immediately assigned to
and value is not used.
|
|
|
|
|
| |
Removed superfluous and suspicious cast in amqp_simple_rpc() call. 'replies' is
already a amqp_method_number_t*
|
|
|
|
|
|
|
|
|
|
|
| |
When doing a nonblocking connect() on win32, select() reports failure using
exceptfds instead of writefds. Allow this narrow case when doing a non-blocking
connect on Win32.
See:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx
Fixes #297
|
| |
|
|
|
|
|
| |
Add select() based poll() implementation for platforms that either support this
better (Win32) or don't support poll().
|
|
|
|
|
|
| |
Get rid of amqp_poll_{read,write} and flatten the call-tree to amqp_poll with an
appropriate flag. Done in preparation for adding a select()-based
implementation of the amqp_poll() function.
|
|
|
|
|
|
|
|
| |
As a performance optimization in the send path, add an AMQP_SF_MORE flag
indicating that more data is intended to be sent, and that packets shouldn't be
sent out on the wire unless there is a full packet's worth of data available.
Use this to specify MSG_MORE to send() on Linux.
|
|
|
|
|
| |
If building with a compiler that does not support C99, this would raise
a warning.
|
|
|
|
|
|
| |
Remove scope local res variable that shadows the function local variable
defined in amqp_socket.c:1118. This removes a possible branch point that
triggered a return of uninitialized value.
|
| |
|
| |
|
| |
|
|
|
|
| |
Add amqp_merge_capabilities function that merges client-properties tables.
|
| |
|
|
|
|
|
| |
These constants are already defined in the Win32, and they're being incorrectly
redefined by rabbitmq-c.
|
|
|
|
|
| |
If this project was Win32 only, I'd use them, but adding lots of ifdefs to kill
warnings doesn't make a whole lot of sense.
|
| |
|
|
|
|
|
|
|
| |
Check for recv heartbeats when blocking on sending to the socket. A blocked send
can indicate that the broker is applying backpressure to publishers, it could
also be that the TCP connection is dead, checking for recv heartbeats can give
an earlier indication that the connection is broken.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Refactor the heartbeat timeout code to hopefully simplify it and hopefully make
it less hairy to deal with in the future.
|
|
|
|
|
| |
Rename amqp_timer_t related functions to improve readability of the code and
clarify what they do.
|
|
|
|
| |
Rename the files to better reflect the functions that they contain.
|
|
|
|
|
| |
This one only shows up when send() does a partial read, which is why it wasn't
caught immediately. Need some better tests for this.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of passing around a start time and timeout interval, calculate this
early and pass around the timeout value (as a implementation detail), then
calculate against current timestamp. This simplifies the code, gives a more
realistic 'timeout' for the function at the cost of potentially a few more timer
pings.
Conflicts:
librabbitmq/amqp_socket.c
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add error codes and associated error strings when the broker does not support
the desired SASL method.
|
| |
|
| |
|