Commit Graph

1044 Commits

Author SHA1 Message Date
Waldemar Quevedo
8926fa0ff1 Fix unconvert checks in server 2017-03-23 20:41:38 -07:00
Colin Sullivan
80490020b2 Merge pull request #440 from nats-io/travis-go18
Update Travis to use Go 1.8
2017-02-22 16:06:49 -07:00
Colin Sullivan
c9d90734c5 Fix staticcheck error found moving to go 1.8 2017-02-21 15:30:15 -07:00
Colin Sullivan
0464583235 Update travis to use the Go 1.8 release. 2017-02-21 15:01:52 -07:00
Derek Collison
37ce250199 Merge pull request #431 from nats-io/fix_staticcheck_error
Fix staticcheck report
2017-02-02 14:48:28 -05:00
Ivan Kozlovic
3316f4bece Fix staticcheck report
Removed `os.Exit()` from function assigned to `flag.Usage`.
2017-02-02 11:50:56 -07:00
Peter Miron
4a82610a38 Updated to use MIT-specific license image. 2017-02-02 12:39:06 -05:00
Derek Collison
33afedcc70 Merge pull request #427 from nats-io/update_test
Update client connect to route port test
2017-01-27 19:18:42 -05:00
Ivan Kozlovic
1c5a34ea42 Update client connect to route port test
With the following client fix: https://github.com/nats-io/go-nats/pull/260
the client should always be able to connect after the initial
failure.
2017-01-27 09:59:29 -07:00
Derek Collison
fdf1a24d78 Merge pull request #424 from nats-io/reject_client_connecting_to_route
[ADDED] Reject clients connecting to route's listen port
2017-01-26 09:50:02 -08:00
Derek Collison
8217ef8058 Merge pull request #426 from nats-io/add_gosimple
Added gosimple
2017-01-26 09:45:30 -08:00
Ivan Kozlovic
1fb9f211ca Added gosimple
- Get gosimple package
- Updated staticcheck's URL
- Moved build and above checks in `before_script` section to fail fast
- Fixed reports from gosimple
2017-01-25 13:30:11 -07:00
Ivan Kozlovic
c925e1c9bf Restored behavior after c.parse() error 2017-01-25 09:15:47 -07:00
Ivan Kozlovic
7c59ce3dba [ADDED] Reject clients connecting to route's listen port
This happens sometimes, and the latest occurence was today:
https://github.com/nats-io/java-nats/issues/96

When it happens, there is no error but subscribers would not receive
anything, etc...

This PR uses the fact that clients set the field Lang in the CONNECT
protocol that ROUTEs do not. I have checked that all Apcera supported
clients do set Lang in the CONNECT protocol.
If we plan to add Lang for routes, we need to find another field or
use a new one, in which case that would work only for new clients
(that would need to be updated).

With this change, when the server accepts a connection on the route
port and detects that this protocol field is present, it now closes
the client connection.

The nice thing is that newer clients, when incorrectly connecting
to the route port, get from the route's INFO the list of client URLs,
which means that on the initial connect error, they are able to
subsequently connect to the proper client port, so it is transparent
to the user (which may or may not be a good thing). However, it is not
guaranteed because if the client is not setting NoRandomize to true,
the client URL is added but the array shuffled, so it is possible that
the client library does not find the correct port in the connect loop.
2017-01-24 19:46:46 -07:00
Derek Collison
0d45f49d90 Merge pull request #423 from nats-io/fix_staticcheck_errors
Fixed errors found by staticcheck
2017-01-24 18:44:20 -08:00
Ivan Kozlovic
27bfed541c Fixed errors found by staticcheck
Staticcheck has probably been updated and is finding new errors.
They have been fixed.

Also, moved the run of staticcheck before running the test suite,
so if it fails, it fails sooner ;-).
2017-01-24 19:34:17 -07:00
Derek Collison
63d6ef9546 Merge pull request #421 from nats-io/make_write_deadline_configurable
[ADDED] Make Write deadline configurable
2017-01-18 21:40:30 -07:00
Ivan Kozlovic
95d0152449 [ADDED] Make Write deadline configurable
We use a hardcoded value of 2 seconds for Write deadline when
writing data to client's socket.
This PR makes that value configurable.

Question is should we push the setting down to the client's object
to avoid indirection such as client.srv.opts.WriteDeadline?
2017-01-18 20:33:44 -07:00
Derek Collison
bfc521a244 Merge pull request #419 from nats-io/remove_max_pending_size
Removed last references to max_pending_size [ci skip]
2017-01-18 14:01:47 -08:00
Ivan Kozlovic
f1c513d7bf Removed last references to max_pending_size [ci skip] 2017-01-18 14:38:34 -07:00
Derek Collison
2c4ffbf7a1 Merge pull request #418 from nats-io/update-vendoring
Add golang.org/x/sys/windows to vendored files
2017-01-17 12:52:39 -08:00
Colin Sullivan
f5ce5d5172 Add golang.org/x/sys/windows to the vendored files 2017-01-17 11:40:25 -07:00
Derek Collison
e402ddda6f Merge pull request #417 from nats-io/win-container-test-fixes
Unit Test updates for a windows container environment.
2017-01-09 09:57:50 -08:00
Colin Sullivan
6e9e491c79 Updates for running in a windows container environment.
* Fixes unit tests running in windows containers with the default configuration.
2017-01-09 10:07:24 -07:00
Derek Collison
85a3032b4d Merge pull request #416 from nats-io/longer-test-client-timeout
Increase the internal test client dial timeout
2017-01-07 07:59:30 -08:00
Colin Sullivan
31dc3a7e11 Increase the client dial timeout.
* Windows and stressed machines require more time to connect; this was causing flappers.
2017-01-06 15:35:41 -07:00
Derek Collison
c275ec7185 Merge pull request #415 from nats-io/tls-add-chacha-default
Add the ChaCha20 ciphers to the default cipher list.
2017-01-05 15:27:52 -08:00
Colin Sullivan
c9a28b9fc0 Reorder based on comments. 2017-01-05 16:13:44 -07:00
Colin Sullivan
57785c55fb Bump ChaCha ciphers in preferences 2017-01-05 16:02:04 -07:00
Colin Sullivan
62693855e8 Add ChaCha20 ciphers to the default cipher list. 2017-01-05 11:30:16 -07:00
Derek Collison
c6e8014ed0 Merge pull request #412 from nats-io/tls-curve-pref
Add curve preference option to configuration files
2017-01-04 09:03:58 -08:00
Colin Sullivan
afceb6ef1b Merge branch 'master' into tls-curve-pref 2017-01-04 09:31:35 -07:00
Colin Sullivan
c692a2b954 Add golang version 1.8beta2 2017-01-04 09:28:39 -07:00
Derek Collison
bc3afada93 Merge pull request #411 from nats-io/update_travis
Change coverage/cross compile trigger for travis.yml
2017-01-04 05:55:15 -08:00
Colin Sullivan
9312ec21db Update cipher suites and curve preferences for go version 1.8 2016-12-30 14:24:58 -07:00
Colin Sullivan
72e3a28315 Merge branch 'master' into tls-curve-pref 2016-12-30 10:27:47 -07:00
Derek Collison
148446d970 Merge pull request #413 from nats-io/windows-event-log
Implement windows event logging
2016-12-30 07:56:08 -08:00
Colin Sullivan
1df5af0491 Implement windows event logging 2016-12-29 13:53:58 -07:00
Colin Sullivan
b133cda3cd Add curve preference option to configuration files.
* Add a preference to specify and order the curve preferences
* Add details tls help
* Deprecate old 1.4 cipher suite code
2016-12-27 15:41:48 -07:00
Ivan Kozlovic
7964a8125f Change coverage/cross compile trigger for travis.yml
Doing code coverage/cross compile for a single Go release. As of now,
if we were to introduce Go 1.8 in the matrix, we would do code
coverage (which may be ok) and create release (which would not be
ok) for 2 Go releases since were were using >= comparison.
This change ensures that we do for only 1.7.x for now.
2016-12-27 13:28:36 -07:00
Ivan Kozlovic
bc5f864bcc Merge pull request #409 from nats-io/implicit_route_retries
[ADDED] Configure number of connect retries for implicit routes
2016-12-22 15:21:45 -07:00
Ivan Kozlovic
d3555053d0 Change option/parameter name 2016-12-22 14:59:27 -07:00
Ivan Kozlovic
ad1804c6e6 Merge pull request #385 from orus-io/clientauth-tls
Add TLS infos to ClientAuth interface
2016-12-22 12:49:12 -07:00
Christophe de Vienne
696296408c Comment GetTLSConnectionState() 2016-12-22 17:42:43 +01:00
Christophe de Vienne
872c9e0c39 Test GetTLSConnectionState
Run GetTLSConnectionState on a non-tls connection (in a dedicated test)
and a tls connection.
Because initializing the TLS connection in the tests is non-trivial,

I hijacked the TestTLSCloseClientConnection test.
2016-12-21 10:42:50 +01:00
Christophe de Vienne
f94983a9a4 Add TLS infos to ClientAuth interface
It makes it possible to implement a Auth that uses client TLS certificates
to identify them.
2016-12-21 10:31:22 +01:00
Ivan Kozlovic
8e68e0cf80 Add code coverage for cluster's config file parameters 2016-12-20 19:04:59 -07:00
Ivan Kozlovic
a8dfaeae3d [ADDED] Ability to configure number of connect retries for implicit routes
When a server is told to connect to a server (with auto-discovery),
it tries to connect once. There have been a report where that
connection fails, but would probably succeed if tried again (#408).
This new parameter allows to configure the number of times a failed
implicit connect should be tried.

Resolves #408
2016-12-20 18:37:23 -07:00
Ivan Kozlovic
5dcad241bc Merge pull request #403 from nats-io/prepare_for_next_release
Release v0.9.6
v0.9.6
2016-12-15 16:01:36 -07:00
Ivan Kozlovic
614c435b08 Release v0.9.6 2016-12-15 15:38:15 -07:00