Commit Graph

15 Commits

Author SHA1 Message Date
Rafael da Fonseca
dfb52adad1 [FIXED] Protocol parsing errors with ws compression and pongs (#1790) 2025-01-29 23:01:08 +01:00
Engin Açıkgöz
8bd17360be [IMPROVED] Use errors.New instead of fmt.Errorf where possible (#1707) 2024-09-19 14:22:16 +02:00
Piotr Piotrowski
b61c7c554f [IMPROVED] Fix linter issues (#1700)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2024-08-16 11:43:02 +02:00
Piotr Piotrowski
d18be0359c [CHANGED] Reload TLS certificates on reconnect (#1264)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-16 17:49:16 +02:00
Ivan Kozlovic
d963c7d71e [UPDATED] Compression library for Websocket (#1259)
Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Co-authored-by: Derek Collison <derek@nats.io>
2023-05-03 17:31:11 +02:00
Piotr Piotrowski
32b9daa3d2 [ADDED] Service api improvements (#1160)
Co-authored-by: Tomasz Pietrek <melgaer@gmail.com>
2022-12-20 12:52:16 +01:00
Cesar V. Sampaio
7ca331ad05 chore: remove deprecated usage of "io/ioutil" (#1150) 2022-12-05 11:26:55 +01:00
Ido Gold
3d5be9a59a Add the ProxyPath 2022-05-03 15:57:19 +03:00
Ivan Kozlovic
16beecb7e3 [FIXED] Websocket: deadlock on authentication failure
This was due to the fact that server sends a websocket CLOSE protocol,
to which the library tried to respond to, but since it was done during
the "connect" handshake under the connection lock, this caused a
deadlock.

Resolves #925

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-03-14 14:51:58 -06:00
Phil Pennock
bf1b00513e Spelling fixes, mostly comments
The new `gospel` tool, <https://github.com/kortschak/gospel>, uses hunspell
libraries but pre-registers as acceptable words every symbol from the Go
source, massively reducing the noise and making comment spell-checking a
tractable problem.  It recently gained support for a `.words` file located in
the same directory as the `go.mod` file, to define local words.  With this, we
can fix real issues too.

This PR reduces the complaints down to 4:
 1. A reference to `syncSubscribers` which I can't figure out
 2. A reference to a `pubArg`
 3. Two references to `splitArgs`.

I made two actual code changes:
 1. Fixing a **non-exported** const type for consistency with all the others:
    `apiStreamList` -> `apiStreamListT`.
 2. Changing an error message to refer to a field which exist

Lots of typo fixes; references to since-renamed fields; etc.

A reference to `PublishAsynMsg` might have been intended to be
`PublishAsyncMsg` but that doesn't exist either, so I removed it.
Similarly, `SubjectIsDelivery` lived briefly but a stale reference was left in
a comment, so I removed that.

To reproduce:

    go install github.com/kortschak/gospel@latest
    gospel .
2022-02-05 21:26:46 -05:00
Ivan Kozlovic
949abffd71 Updates based on code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-09-13 12:59:53 -06:00
Ivan Kozlovic
d8b749672a [FIXED] Websocket: possible panic when decoding CLOSE frame
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-09-13 12:47:26 -06:00
Ivan Kozlovic
9fc5222c60 [FIXED] Websocket decompression of continuation frames
When compression is used, the full message payload need to be
assembled (in case there are continuation frames) before being
decompressed.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-06-21 11:06:43 -06:00
Ivan Kozlovic
c8c0b60e25 Add some comments based on code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-26 08:59:22 -06:00
Ivan Kozlovic
995f67177d Added websocket support
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-23 12:26:09 -06:00