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

View File

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

View File

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

View File

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