Socket closing without prompt
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các socket connect options và callback serverFromRequest.subscription.onUnsubscribe được nêu trong báo cáo, tập trung vào các điều kiện đóng hoặc hủy đăng ký một socket. Không có file hoặc test nào được nêu tên; công việc được xem là hoàn tất khi xác định được các trường hợp hủy đăng ký liên quan và xác định liệu các cài đặt reconnect, timeout hoặc heartbeat có giải thích được hành vi trong môi trường production hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Support plan
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): yes
Context
- node version: 16.0
- module version: 12.0.4
- environment (e.g. node, browser, native): browser (and node)
- used with (e.g. hapi application, another framework, standalone, ...): hapi application
- any other relevant information:
How can we help?
Some users in production are being unsubscribe from the socket without us really knowing why. Their internet access is supposedly stable...
I feel I am missing some cases of automatic unsubscribe so I must ask : what are the different cases where the socket might trigger the onUnsubscribe function ?
Here are the different declarations:
/**CLIENT CODE connection **/
return this.socketClient.connect({
reconnect: true, //whether the client should try to reconnect
delay: 2000, //time in milliseconds to wait between each reconnection attempt, cumulative
maxDelay: 15000, //the maximum delay time in milliseconds between reconnections
retries: 10 //number of reconnection attempts
})
/** SERVER REGISTER **/
await server.register(
{
plugin: Nes,
options: {
heartbeat: {
interval: 15000,
timeout: 5000
},
auth: false
}
},
{
routes: process.env.ROOT_PATH ? {
prefix: ROOT_PATH
} : {}
}
);
this.serverFromRequest.subscription(this.subscribingPath , {
onSubscribe: (socket, path, params)=>{
/** SOME CODE that has nothing to do with network **/
//Managing page reloading by clearing a timeout
if (this.onUnsubscribeTimeout) {clearTimeout(this.onUnsubscribeTimeout)}
},
onUnsubscribe: (socket, path, params)=>{
/** SOME CODE that has nothing to do with network **/
const unloadTimeout = 15000;
this.onUnsubscribeTimeout = setTimeout(()=>{
/** SOME CODE saying what should happen when socket is closed ( basically send message to client saying Chat is closed)
}, unloadTimeout)
}
})
What do you think ?
Is the fact maxDelay very closed to unloadTimeout could explain the issue ?
Are my connect options not precise enough or too low ? Or the heartbeat maybe ?
What would be good production values according to your knowledge ?
Regards and thank you for nes !
- Ngôn ngữ chính
- JavaScript
- Star
- 502
- Fork
- 85
- Merge trung bình
- 16 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hapijs/nes
-
Listener does not correctly handle optional & wildcard routes.Có thể làm lại được @damusix đã nhận 224 ngày trước và không có pull request nào đang mở. Đang mởbug
-
support
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Polling option fallbackĐang mởsupport
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
srikanth235/centraid#1155 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
microsoft/monaco-editor#5563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Package downloads never retry: getUrlWithResuming's retry catch cannot see a rejected requestĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày