Commit Graph

489 Commits

Author SHA1 Message Date
Colin Sullivan
ccca711edd Differentiate signal handling for windows.
Windows has limited support for signals, and does not define syscall.SIGUSR1.  Log rotation will be handled differently in windows.

* Add signal.go for all non-windows builds
* Add signal_windows.go for windows builds.

Today, windows looks to be the only platform that does not have syscall.SIGUSR1 defined.
2016-11-22 15:22:34 -07:00
Derek Collison
1c32f28934 Support to reopen file based logs for rotation 2016-11-21 21:55:24 -08:00
Derek Collison
9e92aaa2de Version bump 2016-11-21 15:12:18 -08:00
Derek Collison
e57c949658 Add support for 'include' to configuration files 2016-11-21 14:58:05 -08:00
Derek Collison
61e0b758d7 Updates for Go client rename, update vendor dependencies 2016-11-20 13:15:37 -08:00
Volodymyr Khoroz
a35d98eebe [#370] Treat ping interval from config as seconds (there is no point in smaller granularity). 2016-11-16 00:31:38 +02:00
Volodymyr Khoroz
a98b51a5ca [#370] Ability to configure ping_interval and ping_max (with tests) 2016-11-16 00:31:38 +02:00
Derek Collison
8ffdb6b7f6 Merge pull request #367 from nats-io/staticcheck
Add staticcheck analyzer to Travis CI
2016-10-27 10:07:07 -07:00
Colin Sullivan
6281894cc5 Add staticcheck static analyzer to travis.
Included are small fixes to address warnings found in test code.  No functional changes.
2016-10-27 09:51:15 -06:00
Ivan Kozlovic
4997637270 [FIXED] assignment copies lock value for crypto/tls.Config
Running `go vet ./...` with `go 1.7.3` would report the following:

```
server/route.go:342: assignment copies lock value to tlsConfig: crypto/tls.Config contains sync.Once contains sync.Mutex
server/server.go:479: assignment copies lock value to config: crypto/tls.Config contains sync.Once contains sync.Mutex
```

Add a “clone” function while waiting for this to be addressed
by the language itself (https://go-review.googlesource.com/#/c/28075/)
2016-10-20 14:59:29 -06:00
Ivan Kozlovic
9f758bbd0d Use simple if/else 2016-10-06 09:30:49 -06:00
Ivan Kozlovic
44d18c3af6 [FIXED] SetLogger to be able set debug/trace to 0
In NATS Streaming, we have a test - started early on - that was testing
logging and called SetLogger(l, true, true), then reset by calling
SetLogger(l, false, false) to reset the values. That obviously had not
the expected effect.
During profiling, I noticed that there were tons of allocated
objects due to NATS server debug/trace statements caused by that.
2016-10-05 17:56:25 -06:00
Ben Tranter
ad6206078f Fix non-ASCII quotes in HTML
Fixes #304

Changes the non-ASCII curly quotes in the HTML to use the regular ASCII double quotes. Also adds a test to check for the existence of non-ASCII characters in that same HTML.
2016-09-12 11:03:19 -04:00
Ivan Kozlovic
8f7f6e9f8b [FIXED] Client certificate verification when verify is true.
Server was incorrectly requiring a client certificate, but not
verifying it.

Resolves #336
2016-08-25 15:33:13 -06:00
Ivan Kozlovic
dcbf5d8d35 Bump to version v0.9.4 2016-08-18 09:27:43 -06:00
Derek Collison
21e583628f Merge pull request #333 from wallyqs/custom-monitoring-server-listen
Enables using the same listen from server for monitoring endpoint via `-a`
2016-08-18 05:33:46 -05:00
Waldemar Quevedo
e46b187230 Enables using the same listen from server as was specified via -a
in the cmd line for the monitoring server as well.
2016-08-17 23:08:37 -07:00
Derek Collison
1b8cde624a Merge pull request #330 from nats-io/ignore_any_in_returned_ips
Check that 0.0.0.0 or [::] is not returned as a client connect URL
2016-08-17 23:20:34 -05:00
Ivan Kozlovic
811e0868ed [FIXED] Data RACE on Unsubscribe when client connection is closed
Resolves #331
2016-08-17 16:46:34 -06:00
Ivan Kozlovic
c543c77c74 Check that 0.0.0.0 or [::] is not returned as a client connect URL 2016-08-17 11:15:05 -06:00
Ivan Kozlovic
e6039e0a8b [FIXED] Server panic when poll for Varz and others concurrently
Resolves #327
2016-08-16 10:50:49 -06:00
Ivan Kozlovic
82dbb3a5ab [ADDED] Option to not advertise to clients cluster's IPs
By default, a server is now sending to its clients the client URLs
of all servers in the cluster. This allows clients to be able
to reconnect to any server in the cluster even if those clients
were not configured with the list of servers in the cluster.

However, there may be cases where it would make sense to disable
this feature. This now can be done with this option/command line
parameter.

Resolves #322
2016-08-12 19:24:12 -06:00
Derek Collison
a31e6b2b77 Merge pull request #324 from nats-io/fix_route_ipv6
[FIXED] Cluster's listener with IPv6
2016-08-12 15:20:36 -07:00
Ivan Kozlovic
3b8412049e [FIXED] Cluster's listener with IPv6
Trying to use IPv6 address for the cluster host would fail.
Also, there were some unclosed channels in case of accept loop
setup failures.

Resolves #323
2016-08-12 15:54:15 -06:00
Ivan Kozlovic
fc7d92a04a [FIXED] When server listens to any interface, return only global IPs
The server was returning all resolved IP addresses, including link
local addresses, which did not make sense for remote clients.

Resolves #321
2016-08-12 14:22:24 -06:00
Ivan Kozlovic
62923be357 Bump version to 0.9.2 2016-08-08 14:56:28 -06:00
Ivan Kozlovic
5185f10fed [FIXED] Route/Cluster override
If the server was started with a cluster section in a configuration
file and one would want to override the routes (using `-routes`) the
server would complain that you need to use `-cluster`. Adding
an override of cluster would not work, server would still complain.
Trying to override simply the cluster listen info (without override
of routes) would also not work.
2016-08-04 13:20:25 -06:00
Ivan Kozlovic
c6d37ecf8f [IMPROVED] Route performance for larger messages 2016-08-01 19:01:34 -06:00
Ivan Kozlovic
6f9d542393 Minor changes based on comments 2016-07-26 12:25:33 -06:00
Ivan Kozlovic
fda5bd7ac7 [ADDED] Server sends INFO with cluster URLs to clients with support
Clients that will be at the ClientProtoInfo protocol level (or above)
will now receive an asynchronous INFO protocol when the server
they connect to adds a *new* route. This means that when the cluster
adds a new server, all clients in the cluster should now be notified
of this new addition.
2016-07-26 10:55:55 -06:00
Ivan Kozlovic
d21210e0e9 [FIXED] PS test to reduce failures in some situations
Added garbage collection before each capture method and bump the
delta threshold to 1MB.

Resolves #310
2016-07-18 13:00:49 -06:00
Derek Collison
ab11e04bf9 Fixes for gofmt -s 2016-07-11 12:16:21 -07:00
Derek Collison
d31d9f41c7 Check for proper dereference 2016-07-11 12:16:05 -07:00
Derek Collison
e3b5713ab9 Check for control line violations and memory attacks 2016-07-11 12:03:49 -07:00
Derek Collison
889ba32cc1 Bump version for multi-user and authorization [ci skip] 2016-06-23 09:22:02 -07:00
Derek Collison
8558c8e4c5 Merge pull request #300 from nats-io/authorization
Authorization
2016-06-20 09:26:10 -07:00
Derek Collison
8d07e06b91 Always check for pruning 2016-06-20 09:10:54 -07:00
Derek Collison
fa95bd936b spelling 2016-06-17 10:09:14 -07:00
Derek Collison
67ed61c837 fixups for PR comments 2016-06-17 09:59:39 -07:00
Derek Collison
248bd8d366 bug fix for _SYS. 2016-06-16 21:46:54 -07:00
Derek Collison
8a80579651 Merge branch 'master' of https://github.com/nats-io/gnatsd 2016-06-16 20:43:40 -07:00
Derek Collison
a55b7c2744 log errors cleanup 2016-06-16 20:42:54 -07:00
Derek Collison
7730fac9e2 Authorization enforcement and performance tweaks 2016-06-16 17:07:25 -07:00
Derek Collison
449aa6e8ef Finalized opts parser for subject authorization 2016-06-16 13:49:26 -07:00
Derek Collison
1d74a0dea3 First pass authorization parser 2016-06-16 10:10:52 -07:00
Derek Collison
27ac524daf version bump to next beta 2016-06-15 11:10:50 -07:00
Ian Eyberg
b5a30be37c . 2016-06-13 10:07:28 -07:00
Ian Eyberg
9d5c5ba1a8 rumprun support 2016-06-13 09:29:40 -07:00
Derek Collison
86e883ce7d Down bump for bug fix release 2016-06-09 12:49:34 -07:00
Derek Collison
8e81a1803c Fix for #288 2016-06-09 12:27:11 -07:00