Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2183 | tweak | always | 11-17-07 02:42 | 11-19-07 22:18 | |
|
|||||
Reporter: | koreth | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.4 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.4 | ||
|
|||||
Summary: | 0002183: Log spew when fsockopen() connection is refused | ||||
Description: |
When fsockopen() is called and there's nothing listening on the remote port, a stack trace is output (if you have logging turned up to FINE level). The stack trace is really not useful since the error is exposed to the PHP code anyway, which presumably can do its own error handling. "Connection refused" is not necessarily even an error condition depending on the application. My patch (and even this may be more logging than the condition really warrants): --- a/modules/quercus/src/com/caucho/quercus/lib/NetworkModule.java +++ b/modules/quercus/src/com/caucho/quercus/lib/NetworkModule.java @@ -47,6 +47,7 @@ import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; import java.io.IOException; +import java.net.ConnectException; import java.net.InetAddress; import java.net.Socket; import java.util.LinkedHashMap; @@ -144,7 +145,10 @@ public class NetworkModule extends AbstractQuercusModule { return stream; } catch (IOException e) { - log.log(Level.FINE, e.toString(), e); + if (e instanceof ConnectException) + log.log(Level.FINE, e.toString()); + else + log.log(Level.FINE, e.toString(), e); if (errstr != null) errstr.set(env.createString(e.toString())); |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|