Proper deferred stream state flip on connection break
This commit is contained in:
parent
880d010989
commit
e026a83d06
1 changed files with 3 additions and 1 deletions
|
@ -39,6 +39,9 @@ func start(l net.Listener) {
|
|||
|
||||
func handle_conn(conn net.Conn, stream_live *bool) {
|
||||
defer conn.Close()
|
||||
defer func(a *bool) {
|
||||
*a = false
|
||||
}(stream_live)
|
||||
if !DoHandshake(conn) {
|
||||
return
|
||||
}
|
||||
|
@ -54,5 +57,4 @@ func handle_conn(conn net.Conn, stream_live *bool) {
|
|||
}
|
||||
HandleDataLoop(chunk_wrapper)
|
||||
go StreamCleanup(chunk_wrapper.params.stream_key, 60)
|
||||
*stream_live = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue