mirror of
https://github.com/yudai/gotty.git
synced 2026-02-23 16:34:07 +01:00
parent
54597c0ba6
commit
be07d420dd
4 changed files with 31 additions and 2 deletions
|
|
@ -79,7 +79,14 @@ func (context *clientContext) goHandleClient() {
|
|||
|
||||
context.command.Wait()
|
||||
context.connection.Close()
|
||||
log.Printf("Connection closed: %s", context.request.RemoteAddr)
|
||||
context.app.connections--
|
||||
if context.app.options.MaxConnection != 0 {
|
||||
log.Printf("Connection closed: %s, connections: %d/%d",
|
||||
context.request.RemoteAddr, context.app.connections, context.app.options.MaxConnection)
|
||||
} else {
|
||||
log.Printf("Connection closed: %s, connections: %d",
|
||||
context.request.RemoteAddr, context.app.connections)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue