File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,10 @@ class App extends Worker
24
24
*
25
25
* @var string
26
26
*/
27
- const VERSION = '0.3.0 ' ;
27
+ const VERSION = '0.3.7 ' ;
28
28
29
29
private $ conn = false ;
30
+ private $ conn_close = true ;
30
31
private $ map = array ();
31
32
private $ access_log = array ();
32
33
@@ -93,14 +94,18 @@ private function auto_close($conn){
93
94
if ( strtolower ($ _SERVER ["SERVER_PROTOCOL " ]) == "http/1.1 " ){
94
95
if ( isset ($ _SERVER ["HTTP_CONNECTION " ]) ){
95
96
if ( strtolower ($ _SERVER ["HTTP_CONNECTION " ]) == "close " ){
96
- $ conn ->close ();
97
+ if ( $ this ->conn_close ){
98
+ $ conn ->close ();
99
+ }
97
100
}
98
101
}
99
102
}else {
100
103
if ( $ _SERVER ["HTTP_CONNECTION " ] == "keep-alive " ){
101
104
102
105
}else {
103
- $ conn ->close ();
106
+ if ( $ this ->conn_close ){
107
+ $ conn ->close ();
108
+ }
104
109
}
105
110
}
106
111
$ this ->access_log [7 ] = round (microtime_float () - $ this ->access_log [7 ],4 );
You can’t perform that action at this time.
0 commit comments