mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
add Context.ResponseWriter.IsHijacked to report whether the underline conn is already hijacked and a lot of cleanup and minor ws stress test example improvements
Former-commit-id: 444d4f0718d5c6d7544834c5e44dafb872980238
This commit is contained in:
@@ -192,8 +192,9 @@ type (
|
||||
// Wait starts the pinger and the messages reader,
|
||||
// it's named as "Wait" because it should be called LAST,
|
||||
// after the "On" events IF server's `Upgrade` is used,
|
||||
// otherise you don't have to call it because the `Handler()` does it automatically.
|
||||
// otherwise you don't have to call it because the `Handler()` does it automatically.
|
||||
Wait()
|
||||
// UnderlyingConn returns the underline gorilla websocket connection.
|
||||
UnderlyingConn() *websocket.Conn
|
||||
}
|
||||
|
||||
@@ -592,6 +593,14 @@ func (c *connection) fireOnLeave(roomName string) {
|
||||
// after the "On" events IF server's `Upgrade` is used,
|
||||
// otherise you don't have to call it because the `Handler()` does it automatically.
|
||||
func (c *connection) Wait() {
|
||||
// if c.server != nil && c.server.config.MaxConcurrentConnections > 0 {
|
||||
// defer func() {
|
||||
// go func() {
|
||||
// c.server.threads <- struct{}{}
|
||||
// }()
|
||||
// }()
|
||||
// }
|
||||
|
||||
if c.started {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user