fix: ws max payload

This commit is contained in:
linyuchen 2024-04-01 22:05:40 +08:00
parent 267052afbb
commit 112ef202d1
4 changed files with 7 additions and 4 deletions

View File

@ -1,10 +1,10 @@
{
"manifest_version": 4,
"type": "extension",
"name": "LLOneBot v3.20.6",
"name": "LLOneBot v3.20.7",
"slug": "LLOneBot",
"description": "使你的NTQQ支持OneBot11协议进行QQ机器人开发, 不支持商店在线更新",
"version": "3.20.6",
"version": "3.20.7",
"icon": "./icon.jpg",
"authors": [
{

View File

@ -31,7 +31,9 @@ export class WebsocketServerBase {
start(port: number) {
try {
this.ws = new WebSocketServer({port});
this.ws = new WebSocketServer({port,
maxPayload: 1024 * 1024 * 1024
});
llonebotError.wsServerError = ''
}catch (e) {
llonebotError.wsServerError = "正向ws服务启动失败, " + e.toString()

View File

@ -78,6 +78,7 @@ export class ReverseWebsocket {
private connect() {
const {token, heartInterval} = getConfigUtil().getConfig()
this.websocket = new WebSocketClass(this.url, {
maxPayload: 1024 * 1024 * 1024,
handshakeTimeout: 2000,
perMessageDeflate: false,
headers: {

View File

@ -1 +1 @@
export const version = "3.20.6"
export const version = "3.20.7"