Skip to content

Commit bf66853

Browse files
author
XZB-1248
committed
update: CHANGELOG.md and workflow
1 parent c400acc commit bf66853

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
go build -ldflags "-s -w -X 'Spark/client/config.COMMIT=$COMMIT'" -o ./built/darwin_amd64 Spark/client
3838
3939
- name: Upload prebuilt client (darwin_arm64)
40-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v3
4141
with:
4242
name: darwin_arm64
4343
path: ./built/darwin_arm64
4444

4545
- name: Upload prebuilt client (darwin_amd64)
46-
uses: actions/upload-artifact@v2
46+
uses: actions/upload-artifact@v3
4747
with:
4848
name: darwin_amd64
4949
path: ./built/darwin_amd64

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## v0.1.9
2+
3+
* Add: special keys for terminal.
4+
* Fix: defunct process remains after terminal exit.
5+
6+
* 新增:终端支持特殊按键。
7+
* 修复:终端退出后shell进程依然存活。
8+
9+
10+
111
## v0.1.8
212

313
* Add: hashed-password authentication.

server/handler/generate/generate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func GenerateClient(ctx *gin.Context) {
8585
ctx.AbortWithStatusJSON(http.StatusNotFound, modules.Packet{Code: 1, Msg: `${i18n|GENERATOR.NO_PREBUILT_FOUND}`})
8686
return
8787
}
88+
defer tpl.Close()
8889
clientUUID := utils.GetUUID()
8990
clientKey, err := common.EncAES(clientUUID, config.Config.SaltBytes)
9091
if err != nil {
@@ -138,7 +139,7 @@ func GenerateClient(ctx *gin.Context) {
138139
}
139140
if len(prevBuffer) > 0 {
140141
ctx.Writer.Write(prevBuffer)
141-
prevBuffer = []byte{}
142+
prevBuffer = nil
142143
}
143144
}
144145

server/handler/utility/utility.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ func CheckUpdate(ctx *gin.Context) {
146146
})
147147
return
148148
}
149+
defer tpl.Close()
149150

150151
const MaxBodySize = 384 // This is size of client config buffer.
151152
if ctx.Request.ContentLength > MaxBodySize {

server/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ func serveGzip(ctx *gin.Context, statikFS http.FileSystem) bool {
377377
if err != nil {
378378
return false
379379
}
380+
defer file.Close()
380381

381382
file.Seek(0, io.SeekStart)
382383
conn, ok := ctx.Request.Context().Value(`Conn`).(net.Conn)
383384
if !ok {
384-
file.Close()
385385
return false
386386
}
387387

@@ -419,7 +419,6 @@ func serveGzip(ctx *gin.Context, statikFS http.FileSystem) bool {
419419
}
420420
}
421421
conn.SetWriteDeadline(time.Time{})
422-
file.Close()
423422
ctx.Done()
424423
return true
425424
}

0 commit comments

Comments
 (0)