Commit Graph

19 Commits

Author SHA1 Message Date
Ivan Kozlovic
dce814009b [CHANGED] Enforce max_control_line for client connections only
Only check limit for CLIENT connection types, however, the check
is done for CLIENT in all conditions, not only in the case of a
split buffer as it was the case so far.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-26 15:33:39 -07:00
Ivan Kozlovic
c27f717ef6 [FIXED] Log file size limit not honored after re-open signal
When the logfile_size_limit option is specified, the logfile will
be automatically rotated. However, if user still sends the re-open
signal (SIGUSR1), the log file will then no longer apply the
size limit.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-06-01 09:17:32 -06:00
Matthias Hanel
a8e6af30a3 On client connect, send first ping after ping interval.
On connect message resend reset timer with setFirstPingTimer, so RTT can
be obtained quicker.

Disable short first ping in default server options for client_test.
In log_test prevent immediate scheduling by setting ping interval.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-03-02 20:10:15 -05:00
Ivan Kozlovic
1b2754475b Refactor async client tests
Updated all tests that use "async" clients.
- start the writeLoop (this is in preparation for changes in the
  server that will not do send-in-place for some protocols, such
  as PING, etc..)
- Added missing defers in several tests
- fixed an issue in client.go where test was wrong possibly causing
  a panic.
- Had to skip a test for now since it would fail without server code
  change.

The next step will be ensure that all protocols are sent through
the writeLoop and that the data is properly flushed on close (important
for -ERR for instance).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-12-12 11:58:24 -07:00
Ivan Kozlovic
ed1901c792 Update go.mod to satisfy v2 requirements
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-06-03 19:45:47 -06:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -07:00
Waldemar Quevedo
a0fe8fd0a5 Fixes to remove traced password
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-12 17:00:41 -07:00
Waldemar Quevedo
7337eb6b80 Fix regex matching group for removing password
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-13 12:49:00 -07:00
Derek Collison
fff62d5bf7 Warn on plaintext passwords in config and redact from logs
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-10 15:29:42 -07:00
Waldemar Quevedo
5e3950df0a Add Warnf to logger interface
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-10 14:50:48 -07:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Ivan Kozlovic
acf4a31e4b Major updates + support for config reload of client/cluster advertise 2018-02-05 20:15:36 -07:00
Tyler Treat
28160f1de2 Remove global logger
gnatsd currently uses a global logger. This can cause some problems
(especially around the config-reload work), but global variables are
also just an anti-pattern in general. The current behavior is
particularly surprising because the global logger is configured through
calls to the Server.

This addresses issue #500 by removing the global logger and making it a
field on Server.
2017-05-31 16:06:31 -05:00
Ivan Kozlovic
474cacad90 Increase code coverage
- Two files were showing poor code coverage affecting the overall
total.
- Fix to a route test that would fail on Windows.

Resolves #460
2017-03-24 11:58:58 -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
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