File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,9 @@ public function open()
239
239
$ r = @socket_connect ($ socket6 , $ ip , $ port );
240
240
if ($ r ) {
241
241
if ($ this ->debug ) call_user_func ($ this ->debugHandler , "Connected to $ ip: $ port! " );
242
- @socket_close ($ socket4 );
242
+ if (!empty ($ socket4 )) {
243
+ @socket_close ($ socket4 );
244
+ }
243
245
$ this ->socket = $ socket6 ;
244
246
return ;
245
247
} elseif ($ this ->debug ) {
@@ -253,7 +255,9 @@ public function open()
253
255
$ r = @socket_connect ($ socket4 , $ ip , $ port );
254
256
if ($ r ) {
255
257
if ($ this ->debug ) call_user_func ($ this ->debugHandler , "Connected to $ ip: $ port! " );
256
- @socket_close ($ socket6 );
258
+ if (!empty ($ socket6 )) {
259
+ @socket_close ($ socket6 );
260
+ }
257
261
$ this ->socket = $ socket4 ;
258
262
return ;
259
263
} elseif ($ this ->debug ) {
You can’t perform that action at this time.
0 commit comments