Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
php-epp
Commits
06ca1ad9
Unverified
Commit
06ca1ad9
authored
Dec 15, 2019
by
Nathan Van Overloop
Browse files
centralnic/issues#3769: add some more information and better time mgmt
parent
ff30e59b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Net/EPP/Client.php
View file @
06ca1ad9
...
...
@@ -105,7 +105,7 @@
}
}
else
{
if
(
$result
===
FALSE
&&
$errno
==
0
){
throw
new
Exception
(
"Connection could not be opened due to socket problem"
);
throw
new
Exception
(
"Connection could not be opened due to socket problem
. Reasons can be unmatched peer name, tls not supported...
"
);
}
else
{
throw
new
Exception
(
"Connection could not be opened:
$errno
$errstr
"
);
...
...
Net/EPP/Protocol.php
View file @
06ca1ad9
...
...
@@ -37,11 +37,12 @@ class Net_EPP_Protocol {
// Loop reading and checking info to see if we hit timeout
$info
=
stream_get_meta_data
(
$socket
);
$time_start
=
microtime
(
true
);
$timeout_time
=
time
()
+
$GLOBALS
[
'timeout'
];
$timeout_time
=
micro
time
(
true
)
+
$GLOBALS
[
'timeout'
];
while
(
!
$info
[
'timed_out'
]
&&
!
feof
(
$socket
))
{
//make sure we don't wait to long
if
(
$timeout_time
>
time
()){
if
(
$timeout_time
>
microtime
(
true
)){
$time_diff
=
microtime
(
true
)
-
$time_start
;
throw
new
exception
(
'Timeout reading from EPP server'
);
}
// Try read remaining data from socket
...
...
@@ -70,7 +71,6 @@ class Net_EPP_Protocol {
if
(
$GLOBALS
[
'debug'
]){
$time_diff
=
microtime
(
true
)
-
$time_start
;
debug_log
(
"returning after
{
$time_diff
}
"
);
}
return
$result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment