Commit Graph

95 Commits

Author SHA1 Message Date
Derek Collison
b0c22e9dfd Track start and uptime per connection 2016-01-09 08:20:24 -08:00
Derek Collison
8393c3c994 Basic INFO for cluster auto-discovery, Addresses #126 2015-12-16 12:36:24 -08:00
Ivan Kozlovic
5036bbbf36 Fix TLS issue where server started to receive TLS data on non TLS connection.
Without the server fix, tls_test.go would likely report an error. The server would show a parser error with protocol snippet containing "random" bytes, likely encrypted data.
2015-12-07 19:44:12 -07:00
Derek Collison
6b8e8d89c8 Use smaller cost function for test, fix race 2015-11-30 18:29:53 -08:00
Ivan Kozlovic
97da466312 Fix races, add a test and adjust others.
* There was a race during unsubscribe()
* 'go test -race' reports a race in TestSetLogger test. This one could be ignored since we normally invoke SetLogger only on server startup. That being said, Travis failed when I tried to submit a PR for the fix of the unsubscribe race. So proposing to fix the logger too.
2015-11-18 20:39:56 -07:00
Derek Collison
200f2d95c6 Merge pull request #139 from nats-io/issue-138
Fix possible non-propagation of subscription interest to routed server.
2015-11-17 22:01:21 -08:00
Ivan Kozlovic
b62835363a Fix possible non-propagation of subscription interest to routed server.
If processRoute executes before createRoute finishes registering the route, and before a subscriber has connected (or reconnected), and the subscriber connects (or reconnects) before the route is registered, then this subscription will stay local and not be forwarded to the route.
2015-11-17 21:36:18 -07:00
Ivan Kozlovic
17d231361d Fix handling of duplicate SUB protocol.
This is issue #136. With routes, it is possible that a subscriber connects (or reconnects) and is about to broadcast the SUB protocol to the routed server, and at the same time, the server sends the list of the local subscriptions. This would result in a SUB processed twice, adding the same sub in the sublist twice. If the server sending the subscription list is restarted, this will leave "detached" subscriptions in the sublist which would trigger the "Bad or Missing ROUTER info" for every message published on that subject.
2015-11-17 20:58:54 -07:00
Derek Collison
b8af53e67a Added in clustered TLS 2015-11-08 14:20:01 -08:00
Derek Collison
749d4f89cc First pass at client TLS support 2015-10-22 03:30:27 +02:00
Derek Collison
fe3b8f2aa1 BufSize option, bump for go1.5.1, bump version 2015-09-18 07:41:33 -07:00
Derek Collison
45564dbde2 race fixes, go1.5 on travis 2015-09-17 19:02:00 -07:00
Derek Collison
8fb92dc7e2 Fix parser bug around MSG protocol.
Make sure we do the right thing when no args are presented for an MSG, e.g. MSG <spc>.
Also do not parse at all of this is a client, only valid for routes.
2015-08-26 23:04:10 -07:00
Derek Collison
bb0e6429bd Fixed race condition 2015-08-06 00:20:17 -07:00
Derek Collison
075529e2fe Properly handle and enforce max payload 2015-08-05 22:05:58 -07:00
Derek Collison
4dd23e0f2d Added slow consumers to varz, fixed reporting bug 2015-07-14 14:55:36 -07:00
Derek Collison
90d1d6d572 Much improved large message performance 2015-06-25 13:51:53 -07:00
Derek Collison
96bab33075 fixed import paths 2015-06-19 12:08:11 -07:00
Derek Collison
6c07375abc Add lang and version for clients 2015-06-15 20:57:49 -07:00
Derek Collison
d98089a6a5 fixed some race conditions 2015-06-15 18:46:31 -07:00
Derek Collison
51f3ca8216 Added placeholder for client language 2015-06-15 18:09:12 -07:00
Derek Collison
e940b2b748 Moved srv check 2015-04-09 09:11:04 -07:00
Derek Collison
2758974735 Fixed logging bugs, added in additional tracing 2015-01-16 11:58:21 -08:00
Derek Collison
651d169dfd Changes to trace logging output, bug fixes 2015-01-09 18:47:16 -08:00
Derek Collison
48f6086f34 Fixed some debug logging 2014-12-18 20:15:12 -08:00
Máximo Cuadros Ortiz
65ae9c16f2 extendable auth methods 2014-11-27 00:26:13 +01:00
Máximo Cuadros Ortiz
54ac589d82 Client: missing Debugf, Noticef and Tracef methods 2014-11-25 23:38:58 +01:00
Ken Robertson
5623b583a9 Updates for new logging to appease govet
Govet doesn't like functions that look like format handlers not ending in `f`,
such as Debug() vs Debugf(). This is changing some of the new log handling to
use 'f' function names to appease govet.

Updated the implicit handling of including the client as an arg without being
used in a format string. Now the client object simply has a Errorf function
for logging errors and it adds itself onto the format string.
2014-10-29 11:32:14 -07:00
Máximo Cuadros Ortiz
7c7578ae38 Notice and Logger messages 2014-10-16 01:16:21 +02:00
Máximo Cuadros Ortiz
6586ac4653 better client identification at logs and some performances improves 2014-10-16 00:44:56 +02:00
Máximo Cuadros Ortiz
96d044dce4 login system abstraction 2014-10-16 00:44:22 +02:00
Julian Friedman and Zach Robinson
79c45db605 No longer add subscriptions to router clients with no existing connection.
race condition:
 - a client is closed at the same time as an incoming SUB message occurs.
 - the subscription is added to the srv.sl even though the socket is
   closed.
 - the connection cleanup has already run, so the bad state is never
   corrected
 - now messages may be forwarded to a client without a connection
 - messages will not be forwarded to a router that needs it now, because
   processMsg assumes the router already received it
2014-10-04 22:38:59 +02:00
Derek Collison
68ce4b41ba function closures 2014-09-18 21:24:09 -07:00
Derek Collison
dc35bc8d2e Merge pull request #44 from fraenkel/stale_reconnect
Let readLoop do the closeConnection magic on any error
2014-09-15 10:50:19 -07:00
Michael Fraenkel
7a7b19e8c1 Prevent duplicate routes properly
* Guarantee lock when checking & adding a route
* Upgrade to a solicited route if one is seen
* Fix race issue when setting the remoteID
2014-09-13 22:06:43 -05:00
Michael Fraenkel and Zach Robinson
c5db2a03a3 Let readLoop do the closeConnection magic on any error
clearConnection will close the socket, but defer to readLoop to clean
up the client's connection
2014-09-12 11:20:57 -07:00
Ken Robertson
8ccf0a8bb8 Fix gofmt issues 2014-08-12 23:06:01 -07:00
w00228948
31bc0bdb8c Use authTimeout in setAuthTimer 2014-08-12 17:55:59 +00:00
Derek Collison
13d256b8cc Fix minor races, add in 1.3 to testing, bump version 2014-07-24 08:03:04 -07:00
Derek Collison
e172f4bdf9 Fixed issue #29 with subscriptions leaking across routes on auto-unsubscribe 2014-04-30 14:18:42 -07:00
Derek Collison
98b7482b68 syntax 2014-04-16 09:25:13 -07:00
Derek Collison
7da1e87748 copyright hygiene 2014-02-06 19:34:12 -08:00
Derek Collison
edc49b7924 Fixes issues #21 and #22 2014-02-06 19:24:11 -08:00
Derek Collison
eb5c550f10 Fixed slice panic on MSG_ARG split buffer 2013-12-12 13:11:37 -08:00
Derek Collison
ae94365ca4 Removed setting the Read or Write Buffers.
For some reason, this caused abysmal performance issues on Mac (Mavericks). Still investigating.
2013-12-08 14:52:34 -08:00
Derek Collison
688963fd0a Use shortcut 2013-11-18 16:03:16 -08:00
Derek Collison
6d0f200aca Don't trace included CR_LF 2013-10-18 13:02:49 -07:00
Derek Collison
b32bc384c4 Fixes for reflective solicited routes 2013-10-18 12:53:47 -07:00
Derek Collison
f0d98db3c4 Handle errors over routes better 2013-10-16 10:46:03 -07:00
Derek Collison
bd0bb5d52c Properly process INFO messages from routes. 2013-10-16 08:44:59 -07:00