-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CAE-1088] feat: RESP3 notifications support #3418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b02eed6
1ff0ded
e6e2cea
d7fbe18
1331fb9
4747610
70231ae
958fb1a
79f6df2
c33b157
fdfcf94
be9b6dd
8006fab
d1d4529
a2de263
ad16b21
d3f6197
e6c5590
03bfd9f
9a7a5c8
ada72ce
91805bc
e31987f
075b930
f7948b5
3473c1e
d820ade
b6e712b
f66518c
f4ff2d6
cb8a4e5
c44c8b5
47dd490
1606de8
d530d45
5972b4c
ec4bf57
b4d0ff1
84123b1
d780401
604c8e3
b23f43c
7a0f316
225c0bf
2681d6d
32bca83
4b45620
8e17e62
52f2b2c
8418c6b
1d204c2
be3a6c6
84f788e
11ecbaf
409dac1
1e2df9f
4cd9853
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,6 +12,9 @@ import ( | |||||||||
|
||||||||||
var errUnexpectedRead = errors.New("unexpected read from socket") | ||||||||||
|
||||||||||
// connCheck checks if the connection is still alive and if there is data in the socket | ||||||||||
// it will try to peek at the next byte without consuming it since we may want to work with it | ||||||||||
// later on (e.g. push notifications) | ||||||||||
func connCheck(conn net.Conn) error { | ||||||||||
// Reset previous timeout. | ||||||||||
_ = conn.SetDeadline(time.Time{}) | ||||||||||
|
@@ -29,7 +32,9 @@ func connCheck(conn net.Conn) error { | |||||||||
|
||||||||||
if err := rawConn.Read(func(fd uintptr) bool { | ||||||||||
var buf [1]byte | ||||||||||
n, err := syscall.Read(int(fd), buf[:]) | ||||||||||
// Use MSG_PEEK to peek at data without consuming it | ||||||||||
n, _, err := syscall.Recvfrom(int(fd), buf[:], syscall.MSG_PEEK|syscall.MSG_DONTWAIT) | ||||||||||
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||
|
||||||||||
switch { | ||||||||||
case n == 0 && err == nil: | ||||||||||
sysErr = io.EOF | ||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.