Commit Graph

65 Commits

Author SHA1 Message Date
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
Derek Collison
d21e2caf8c golint updates 2013-10-13 09:52:51 -07:00
Derek Collison
6ab5d6a337 Fixed msg payload accounting, made http monitoring work in Go routines 2013-08-19 15:09:41 -07:00
Derek Collison
d322939b17 gofmt 2013-08-19 12:16:30 -07:00
Derek Collison
8fa318738c Attach /r/n to msg to avoid extra write. Fix auth checks 2013-08-19 12:14:29 -07:00
Derek Collison
c7ec32b2e0 Make checking authTimer cheaper 2013-08-16 06:46:50 -07:00
Derek Collison
0463533904 Transfer scratch buffer to client struct off of stack 2013-08-15 17:07:26 -07:00
Derek Collison
60f4c67bbf Cleaner way of handling the initial sends 2013-08-03 14:24:19 -07:00
Derek Collison
cf0f30200f log file support, data race fixes 2013-08-02 16:52:54 -07:00
Derek Collison
8026c3e91d Fix data read race 2013-07-30 18:44:57 -07:00
Derek Collison
b136f41fdb Queue Subscriber rework 2013-07-29 22:33:16 -07:00
Derek Collison
de469cada6 Reconnect logic 2013-07-29 20:02:47 -07:00
Derek Collison
c61412a862 Only send over route once 2013-07-29 18:13:32 -07:00
Derek Collison
025b63300b 1-hop semantics for messages from routes 2013-07-29 17:09:41 -07:00
Derek Collison
d6357e63ea Place MSG prefix in header, avoid append 2013-07-29 17:01:06 -07:00
Derek Collison
ec4a46c959 MSG proto processing 2013-07-29 15:48:07 -07:00
Derek Collison
dd99fd12ab First pass soliciting routes with auth 2013-07-28 09:33:13 -07:00
Derek Collison
72b68bf363 Added sub and unsub broadcast to routes 2013-07-27 22:05:15 -07:00
Derek Collison
bfee36860d Fixed bugs handling edge cases with auto-unsubscribe 2013-06-25 18:26:41 -05:00
Derek Collison
c483a68a41 Removed deadlock on flush fail 2013-06-13 11:32:43 -07:00
Derek Collison
33fdc5274d Fixed data races 2013-06-12 00:12:52 -07:00
Derek Collison
ef2902eef2 Fix data races 2013-06-11 22:32:17 -07:00
Derek Collison
0af6ae2455 Fix bug that caused crash in go 1.1 2013-05-31 08:12:51 -07:00
Derek Collison
0ae60a4549 Added proper processing of client PONGs 2013-02-05 17:36:01 -08:00
Derek Collison
fd1f6faa59 Added on /connz endpoint for monitoring 2013-01-22 09:35:46 -08:00
Derek Collison
0a45c0bc5a Only increment server stats if available 2013-01-02 18:15:55 -06:00
Derek Collison
3977043780 Added first pass http monitoring (e.g. /varz) 2013-01-02 18:11:01 -06:00
Derek Collison
b763c36157 Added periodic PING support 2012-12-20 14:34:49 -08:00
Derek Collison
8b8c05daf9 Remobved spurious printf 2012-12-18 17:34:36 -08:00
Derek Collison
fb79a982ef Added ability to run server as a Go routine 2012-12-18 16:56:49 -08:00
Derek Collison
cbac3dd947 Check for closed flush connection clients 2012-12-17 16:11:22 -08:00