Skip to content

Commit

Permalink
server: fix resetting writer when OnPlay fails (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Jan 18, 2025
1 parent 4c8670a commit 6240aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ func (ss *ServerSession) handleRequestInner(sc *ServerConn, req *base.Request) (

if res.StatusCode != base.StatusOK {
if ss.state != ServerSessionStatePlay {
ss.writer.buffer = nil
ss.writer = nil
}
return res, err
}
Expand Down Expand Up @@ -1238,7 +1238,7 @@ func (ss *ServerSession) handleRequestInner(sc *ServerConn, req *base.Request) (
})

if res.StatusCode != base.StatusOK {
ss.writer.buffer = nil
ss.writer = nil
return res, err
}

Expand Down

0 comments on commit 6240aa2

Please sign in to comment.